Package com.iizix.js.build
Class WebResourceCompressor
- java.lang.Object
- com.iizix.js.build.WebResourceCompressor
public class WebResourceCompressor extends java.lang.Object
Perform the compression of javascript and css files- Author:
- Christopher Mindus
Constructor Summary
Constructors Constructor Description WebResourceCompressor()
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.io.File
getFile(java.lang.String name)
Gets the file location on disk of a specific file name or system setting.static void
main(java.lang.String[] args)
Entry point.
Method Detail
main
public static void main(java.lang.String[] args)
Entry point. First argument is the root path to the web server, i.e. to the static js/css resources.During Maven build, the root path is com.iizix.js/target/tmp/js/root, which is a direct copy of com.iizix.js/js/root. We're working on a copy because we don't want to mess with the source, it would make builds not idempotent.
This can be called "standalone", from an IDE. But be careful that once the js is transformed, you need to use a fresh js root to apply it again. For this I found a very practical use of git..
getFile
public static java.io.File getFile(java.lang.String name)
Gets the file location on disk of a specific file name or system setting.