componentjs / builder2.js

builder for component
50 stars 20 forks source link

plugin order in the scope of the whole build process #66

Open timaschew opened 10 years ago

timaschew commented 10 years ago

I want to know if it's possible with the API or otherwise how to achieve this feature:

I want to transform all jade files of the resolved tree, then I want to use the builder-jade plugin. Currently I only know how to do these steps during a build of just one file.

Actually I want to include jade templates from other components without using ../../.

I've already changed the builder-jade plugin to support a new (es6 import) syntax in jade: include foo, bar from localComponent and it already works.

But it fails in some cases with transitive "es6" syntax includes, I'm sure it's because the jade files are build in a specific order and in each build step the include syntax is resolved then it compile to jade. But I need to do the syntax resolving thing in a scope above.

jonathanong commented 10 years ago

i'm not sure what this means. the builder only converts jade templates to functions. sounds like you want something many-to-1, which is too complicated and probably unnecessary.

if you just want to require() another template, just make the jade template the main file and you're good to go.