Closed Stuk closed 10 years ago
Yeah, we do need some more knobs in package.json for run-time or mop-time extension-based compile and load middleware.
Maybe better in a mop.json
On Friday, January 18, 2013, Stuart Knightley wrote:
I've been thinking it would be really useful to allow a package to specify a processing/optimization step. For example the localization messages.json need specific processing which would be good to encapsulate in the montage repo, rather than in the mop repo.
Strawman package.json
{ "name": "...", ... "optimizations": [ "scripts/messages", "module-name/to-require/that-exports-a-function", ... ]}
I'm not sure what arguments would be passed to the exported function.
— Reply to this email directly or view it on GitHubhttps://github.com/montagejs/mop/issues/12.
It depends on whether the same information is useful at run-time too. With a CoffeeScript compiler, it would be useful. With the HTML loader, both. With our JSON loader, both. With the Minifier, only useful in the optimization step.
@stuk, would you agree that this issue is quite well addressed by the new knobs for "optimizers", "translators", "compilers" expressible in package.json in mr@v2?
Yes.
I've been thinking it would be really useful to allow a package to specify a processing/optimization step. For example the localization messages.json need specific processing which would be good to encapsulate in the montage repo, rather than in the mop repo.
Strawman package.json
I'm not sure what arguments would be passed to the exported function.