Think about simplifying deps format
Suggestions:
- drop
noDeps - get rid of
shouldDepsin favour of onlymustDepssemantic
cc @floatdrop
~~Drop depsByTech and tech property in *.deps.js files should be added to the list.~~
We can think about movIng noDeps and some rarely used features out of basic deps tech to some helpers (independent techs) or plugins (injecting to base deps tech). E.g. depsByTech and tech property yup.
are you sure in the direction of replace "shouldDeps -> mustDeps"?
if block page want to use blocks link and image, then final deps array will be ['link', 'image', 'page'] which seems to be inversed, because expected order in normal cases is ['page', 'link', 'image']. So if you want to eave only one from shouldDeps or mustDeps, then one which will remain should be shouldDeps.
By the way why do you want to replace shouldDeps with mustDeps?
drop noDeps :+1:
depsByTechandtechproperty in*.deps.jsfiles should be added to the list.
fully agree
definitely doesn't agree with depsByTechs — it's different kind of stuff (and still there is no code example of avoiding it in cases where it needs)
we need mustDeps because we need to describe only ordered dependencies (in case of CSS redefinings and redefinings in our JS and BEMHTML)
blocks page doesn't need to depend on blocks link and image (there is no need in link and image to build <html><head><body>) — desktop.blocks/my-page/my-page.bemdecl.js should describe ['page', 'link', 'image']
blocks page doesn't need to depend on blocks link and image (there is no need in link and image to build
) — desktop.blocks/my-page/my-page.bemdecl.js should describe ['page', 'link', 'image']
it was abstract example.
@matmuchrapna It is hard to discuss such things using abstract examples. Current implementation solves a list of specific tasks, not abstract.
This topic is outdated. After a month of developing site with dependencies I started to wonder, if deps.js files is a legacy way to support dependencies.
I like the simpe format (shouldDeps -> mustDeps).
Block should talk about what he wants for his work (mustDeps way).
shouldDeps === chaos === dirt (My abstract thoughts)