This is an Apache Ant project with which you can minify (compress) JavaScript and CSS files in a specified directory recursively.
ant -Dsrc="Home directory of your source files" minify
- Extension of CSS files should be .css
- Extension of minified CSS files will be .min.css
- CSS files will be minified with YUI Compressor
- Extension of JavaScript files should be .js
- Extension of minified JavaScript files will be .min.js
- JavaScript files will be minified with Google Closure Compiler
- The minified files will be put in the same directory of unminified file
- If the minified version already exists, it won't be overwritten
- By default, ignore the JavaScript and CSS files in both node_modules and bower_components
- If you have a multi-core processor, your JavaScript and CSS files will be minified concurrently
- Google Closure Compiler:
- Version: v20150901
- Release date: 2015-09-02
- License: Apache License 2.0
- Yahoo YUI Compressor:
- Version: 2.4.7 (v2.4.8 has an issue on windows, see Unable to specify absolute path for output file)
- Release date: 2013-05-15
- License: BSD
- ANT Contrib
- Version: 1.0b3
- Release date: 2006-11-02
- License: Apache Software License, Version 1.1
- This product includes software developed by the Ant-Contrib project (http://sourceforge.net/projects/ant-contrib).