Class WebResourceCompressor

java.lang.Object
com.iizix.js.build.WebResourceCompressor

public class WebResourceCompressor extends Object
Perform the compression of javascript and css files
Author:
Christopher Mindus
  • Constructor Details

    • WebResourceCompressor

      public WebResourceCompressor()
  • Method Details

    • main

      public static void main(String[] args)
      Entry point. First argument is the root path to the web server, i.e. to the static web html/js/css/image 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 File getFile(String name)
      Gets the file location on disk of a specific file name or system setting.