Closed vogdb closed 11 years ago
Please read the docs more carefully.
All and every GCC option is supported. You just have to add it under the compilerOpts
key.
Sorry, missed this. Also --module
option confused me. Because I had to have a lot of them I couldn't figure out how do it. Obviously I couldn't write something like this:
compilerOpts: {
module: 'first:2'
module: 'second:1:first'
}
Now I figured out how to make multiple modules in the generated cmd.
compilerOpts: {
module: 'first:2 --module second:1:first'
}
IMO this is kind of a hack but it is working.
@vogdb at that point i typically decouple everything and make the configuration a bit more dynamic... e.g.
var modules = [];
modules.push('first:2');
modules.push('second:1:first');
/* ... */
var useModules = modules.join(' --module ');
compilerOpts: {
module: useModules
}
you can be creative with that...
Thanks! Will keep this in mind.
Right now there is a lot of the gcc options which are not covered by this plugin. For example
--module
,--transform_amd_modules
,--module_output_path_prefix
options. Because there are so many of them I suggest that instead of adding the correspond option for each of them to add only one new option that will allow direct adding of the gcc options to the generating gcc command. Let's call this new optionmanualControl
. Then example usage of it will be:Will generate the next cmd:
java -jar node_modules/superstartup-closure-compiler/build/compiler.jar --js plugins/ZoomButtons/ZoomButtons.js --js_output_file=dist/canvas-interaction-zoom-buttons.min.js --module first:2 second:1:first --module_output_path_prefix="dist"
What do you think about this option?