segment-boneyard / component-jade

A plugin to transpile Jade files for the component builder.
12 stars 8 forks source link

Using in a "Sub-Component" #5

Closed dominicbarnes closed 11 years ago

dominicbarnes commented 11 years ago

I used the component-jade builder plugin on a private component. When I go to use that component within another component, the templates aren't being generated or included.

I think I understand why, and it's because the custom builder isn't being invoked for dependencies within my upper component. If that's the case, I have no clue how to use a plugin like component-jade within my components, since it only works directly on the component you use it on. Does that mean a plugin like this is only intended for use at the highest level of a component tree? (as in, you build an entire application with component?)

fwiw, I used the cli flag --use component-jade in my sub-component's Makefile, and adding it to my upper-component did not change anything. Does anyone have any insight on how to use plugins like this for sub-components?

ianstormtaylor commented 11 years ago

I would have thought using it at the top level would change that to be honest, but it might not. Really why are the components being nested like that instead of just requiring each other at the same level?

dominicbarnes commented 11 years ago

I'm creating an interface as a component so that can be re-used in different contexts, and it is comprised of smaller components for the different UI elements within it. I'm not "nesting" in the sense of creating inheritance chains.

ianstormtaylor commented 11 years ago

Gonna close this for now