bem-core icon indicating copy to clipboard operation
bem-core copied to clipboard

Think about simplifying deps format

Open veged opened this issue 11 years ago • 13 comments

Suggestions:

  1. drop noDeps
  2. get rid of shouldDeps in favour of only mustDeps semantic

veged avatar Aug 22 '14 18:08 veged

cc @floatdrop

veged avatar Aug 22 '14 18:08 veged

~~Drop depsByTech and tech property in *.deps.js files should be added to the list.~~

floatdrop avatar Aug 22 '14 19:08 floatdrop

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.

qfox avatar Aug 22 '14 19:08 qfox

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.

iamstarkov avatar Aug 22 '14 19:08 iamstarkov

By the way why do you want to replace shouldDeps with mustDeps?

iamstarkov avatar Aug 22 '14 19:08 iamstarkov

drop noDeps :+1:

iamstarkov avatar Aug 22 '14 19:08 iamstarkov

depsByTech and tech property in *.deps.js files should be added to the list.

fully agree

iamstarkov avatar Aug 22 '14 19:08 iamstarkov

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)

veged avatar Aug 22 '14 19:08 veged

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']

veged avatar Aug 22 '14 19:08 veged

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.

iamstarkov avatar Aug 22 '14 20:08 iamstarkov

@matmuchrapna It is hard to discuss such things using abstract examples. Current implementation solves a list of specific tasks, not abstract.

arikon avatar Oct 28 '14 17:10 arikon

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.

floatdrop avatar Oct 29 '14 07:10 floatdrop

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)

belozer avatar Mar 16 '15 22:03 belozer