Class WebResourceCompressor


  • public class WebResourceCompressor
    extends java.lang.Object
    Perform the compression of javascript and css files
    Author:
    Christopher Mindus
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static java.io.FilegetFile​(java.lang.String name)
      Gets the file location on disk of a specific file name or system setting.
      static voidmain​(java.lang.String[] args)
      Entry point.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WebResourceCompressor

        public WebResourceCompressor()
    • 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.