minify-maven-plugin
minify-maven-plugin copied to clipboard
Closure: source map to multiple JavaScript files
Hello, I have implemented a new feature (enhancement) as requested by my boss. I needed many links in the source map to the original JavaScript files before they were merged and minified. Now there is one link generated to the merged file. But we needed many links to the original sources because we have some pages with many javascript files. The CLOSURE compiler supports this feature already, but you have to invoke it with an array of all the source files. I have implemented this and pushed my changes to a fork. I have added a new boolean configuration property closureMapToOriginalSourceFiles in the pom.xml that works along with the existing config properties jsEngine CLOSURE and closureCreateSourceMap true
Please review my changes and merge. Comments and questions are welcome.
I think my changes are backward-compatible over the existing minify configurations.
I also need a similar option for the CSS compression, but YUI compressor does not support source maps, so I am looking for another CSS compressor for that.
Thanks, Svetlin
I will come back to this issue on the next release. I'm also considering adding Closure Stylesheets to replace YUI compressor in the future.