Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Vsevolod Strukchinsky
    @floatdrop
    Some part of docs about (should|must|no)Deps is here - http://ru.bem.info/tools/bem/bem-tools/depsjs/
    Docs says:
    noDeps cancels dependencies on lower redefinition levels, preserving them only to the level the noDeps property is defined upon
    But what is lower level of definition?
    Is is works this way? A mustDeps B + A noDeps C + B mustDeps C = A B?
    Or it should only affect levels, but not inheritance in same level of definitions?
    Sergey Berezhnoy
    @veged
    noDeps cancel dependencies — it means that A mustDeps B + A noDeps B = A
    more real example — if you have library with some dependency between particular two blocks you can delete it (exactly) on your project level throughout noDeps
    so noDeps doesn't mean that you "delete block from result" but means that you "remove particular dependency link between particular blocks" (actually it's work not only for block but for any BEM-entities: blocks, elems, modifiers)
    Vsevolod Strukchinsky
    @floatdrop
    Why documentation mentions lower redifinition level?
    Sergey Berezhnoy
    @veged
    it means lower in order of build: usually you have something like "core lib", "project level", "page level"
    so the page level is lowest one and so on
    but you can also use noDeps in same level — they will have top most priority among mustDeps/shouldDeps
    Vladimir Starkov
    @iamstarkov
    now I don't understand noDeps at all.
    Sergey Berezhnoy
    @veged
    it's much more ease then you can think about :-) it's just a rollback for particular dependency declaration — if you decl A->B you can later say "no, cancel deps A->B" — thats it!
    Vladimir Starkov
    @iamstarkov
    at build bem tools have graph of blocks with should and must connections to other blocks in graph. So if block1 connect to block2 with should or must connection, then if block2 have block1 in noDeps then all block1's connections to block2 cancelled?
    Sergey Berezhnoy
    @veged
    and do not take in mind any levels stuff — it gonna be intuitive if you start to decl what you want
    Vladimir Starkov
    @iamstarkov
    am i right with prev question?
    Sergey Berezhnoy
    @veged
    if b2 have noDeps to b1 it doesn't affect any b1 deps b2
    Vsevolod Strukchinsky
    @floatdrop
    does it affects dependencies in upper levels of declaration (for example bem-core)?
    Sergey Berezhnoy
    @veged
    b2 noDeps b1 affects only b2 *Deps b1
    Vsevolod Strukchinsky
    @floatdrop
    okay, suppose I have b2 in level1 and level2
    and in level1 b2 is dependent on b1
    but I write noDeps in level2
    Sergey Berezhnoy
    @veged
    @floatdrop yes, it affect any levels
    Vsevolod Strukchinsky
    @floatdrop
    okay
    thanks!
    should it be named ignore or exclude then?
    Sergey Berezhnoy
    @veged
    it can be and can not ;-) I'm not a fan of unnecessary renamings
    there are to many synonyms ;-)
    Vsevolod Strukchinsky
    @floatdrop
    what about A shouldDeps B + B shouldDeps C
    and A noDeps C?
    Sergey Berezhnoy
    @veged
    the main problem to understanding is not a name, but the semantic
    Vsevolod Strukchinsky
    @floatdrop
    and reverse example: A shouldDeps B + B shouldDeps C and C noDeps A (in case you are building C)
    Sergey Berezhnoy
    @veged
    noDeps affect only direct deps declaration and doesn't affect any indirect declarations
    Vsevolod Strukchinsky
    @floatdrop
    is is true @matmuchrapna ?
    I heard we are ignoring i-bem with some mods
    from block, that mustDeps i-bem
    So in our case: b-page mustDeps i-bem, i-bem someHowDeps __dom_auto and b-page noDeps i-bem__dom_auto
    I am pretty sure, that it is not direct declaration in our case
    Vladimir Starkov
    @iamstarkov
    @veged also, can you tell how and why noDeps appeared?
    Sergey Berezhnoy
    @veged
    the purpose of noDeps originally was for canceling dependency between b-page and i-bem__dom_init_auto — but after that people find more use cases
    Alexej Yaroshevich
    @zxqfox

    the purpose of noDeps originally was for canceling dependency

    so it's cancelDeps :palm_tree:

    Alexej Yaroshevich
    @zxqfox
    Guys. How you using your libraries in express apps?
    I'm asking because I want a critical response on this https://github.com/zxqfox/express-bem
    Vsevolod Strukchinsky
    @floatdrop
    How does it fetches dependent bemhtml/bemtree files for view from desktop.bloks @zxqfox ?
    @veged - is this case you mentioned as direct dependency?
    Alexej Yaroshevich
    @zxqfox
    It uses already built bundles.
    Vsevolod Strukchinsky
    @floatdrop
    Then you should not mention desktop.blocks under https://github.com/zxqfox/express-bem#directories, am I right?
    (and it should be mentioned in readme somewhere)