Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document pass-through behavior #5

Closed
kylecordes opened this issue Sep 5, 2014 · 3 comments
Closed

Document pass-through behavior #5

kylecordes opened this issue Sep 5, 2014 · 3 comments

Comments

@kylecordes
Copy link

This plug-in appears to pass through all non-coffee files as is, while swapping out coffee files to JavaScript files. I found that surprising, and ended up chaining on another plug-in to strip out all but the JavaScript files.

Is the right idiom that a Broccoli build process should pass essentially all files through a series of plug-ins, each of which transparently passes along everything it doesn't care about? Or is the right idiom that one should use a bunch of plug-ins to process different kinds of things, then merge together the results in at the end? Maybe the former seems more suitable if most plug-ins will make a one to one file mapping? Maybe the latter seems more suitable if most plug-ins will return a tree of substantially different shape than what they accept?

I don't know the answer to the idiom question; but I do know this:

It would be easier to understand while getting started, if plug-ins would state in their documentation what they do with files they don't care about.

If you would rather have a pull request than this wall of text, just say so :-)

@joliss
Copy link
Owner

joliss commented Sep 5, 2014

All broccoli-filter based plugins pass files through that they don't know about. This is intentional - it can be useful e.g. when you mix .coffee, .handlebars and .js files. Thanks to the pass-through, you can chain the coffee script filter and a handlebars filter to get a tree full of .js files.

@kylecordes
Copy link
Author

Thanks. What do you think of documenting this in the readme?

@joliss joliss closed this as completed in 4e00d5b Feb 27, 2018
@joliss
Copy link
Owner

joliss commented Feb 27, 2018

Over 3 years later, fixed in 4e00d5b! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants