Open TravisTheTechie opened 9 years ago
Yeah, this is something that I'm pushing off for now because we don't know what that should look like.
Thoughts so far:
cabbage()
and provide a modified tree. This won't be a panacea, but at least an API exists now, which wasn't really true of GruntWhat if we had just a couple places in the config where you could inject something via the config into the tree?
pipeline:
js:
jsAddon:
configFor: "this-addon"
output: "<%= files.js.generated %>"
tree: [
(config) -> require('broccli-js-addon')(config.pipeline.jsAddon),
etc
]
And we just merge those into the tree?
I'm not understanding your suggestion quite
Then change js.coffee
to be something like...
uglify(merge(
_.map(config.pipeline.js.tree, (item) -> item(config))
concatenated,
exportTree(concatenated, destDir: 'generated') if env != "production"
))
But not exactly because I assume that merge
won't accept an array at the moment. Do the same for CSS, can support stylus, less, etc. Do it for pages and can support markdown/etc.
Not suggesting this is a great idea. Just brainstorming lower impact ways to extend.
This doesn't feel right to me yet. I want to keep stewing for a bit
Support Cabbage plugins, like Lineman does. Maybe anything that's
cabbage-
inthe node_modules
?