componentjs / spec

Component specs
34 stars 4 forks source link

inherit dependencies #44

Closed jonathanong closed 10 years ago

jonathanong commented 10 years ago

so there's already inheritance going on between the "root" component and all the locals, specifically with paths and remotes. this is probably considered an anti-pattern and the builder should be able to handle this anyways, but how do you feel about explicitly allowing dependencies to be inherited (documentation wise)?

for example, you might use component/query in every component, but writing component/query as a dependency in every component is a little annoying. it's easier just to write it once in the "root" component. if a specific component wants to use a different query, they can set one as their own dependency.

this would also allow you to avoid writing locals all the time, which is unnecessary most of the time with a smart builder.

it would confuse the tree though and thus bundling.

jonathanong commented 10 years ago

im retraded. this will break css. this will be handled by the builder anyways for robustness