A console application that allows you to easily compile and optimize your JavaScript files in batches using the Google Closure Compiler.
Run the following command.
pip3 install pyclosure
usage: python -m pyclosure [-h] [--input <INPUT_FILE/INPUT_DIR>] [--output <OUTPUT_FILE/OUTPUT_DIR>] [--level {WHITESPACE_ONLY, SIMPLE_OPTIMIZATIONS,ADVANCED_OPTIMIZATIONS}] [--extern <COMMA_SEPARATED_VARS>]
-h, --help
- show the help menu--input
- enter the input file or directory (for batch processing)--output
- enter the output file name/folder name (for single processing, the default value isindex.min.js
.)--level
- the type of compilation to be used for the variables.- Supported values:
WHITESPACE_ONLY
SIMPLE_OPTIMIZATIONS
ADVANCED_OPTIMIZATIONS
- Supported values:
--extern
(optional) - enter in variables you want in your compiled code separated by semi-colons.
The tests can be run using python tests/test_basic.py
. Track the pipelines in Travis CI.