Skip to content

femtopixel/docker-google-closure-compiler-api

Repository files navigation

latest release

Google Closure Compiler API - Docker Image

latest release PyPI version PayPal donation Buy me a coffee Buy me a coffee

DISCLAIMER: As-of 2021, this product does not have a free support team anymore. If you want this product to be maintained, please support.

(This product is available under a free and permissive license, but needs financial support to sustain its continued improvements. In addition to maintenance and stability there are many desirable features yet to be added.)

This image allows you to Compile your JS code using Google Closure Compiler API in CLI

Install

pip3 install google_closure_compiler_api

Usage

usage: compiler.py [-h] [--js JS] [--js_output_file JS_OUTPUT_FILE] [--compilation_level {WHITESPACE_ONLY,SIMPLE_OPTIMIZATIONS,ADVANCED_OPTIMIZATIONS}]

optional arguments:
  -h, --help            show this help message and exit
  --js JS               Input file
  --js_output_file JS_OUTPUT_FILE
                        Output file
  --compilation_level {WHITESPACE_ONLY,SIMPLE_OPTIMIZATIONS,ADVANCED_OPTIMIZATIONS}
                        Compilation level

Default values

  • --js : /dev/stdin (input your code)
  • --js_output_file : /dev/stdout (Prints compiled code in the shell)
  • --compilation_level : WHITESPACE_ONLY

Docker usage

docker run --rm -ti -v /path/to/my/file.js:/root/myfile.js femtopixel/google-closure-compiler --js /root/myfile.js