Skip to main content

Google closure compiler CLI API

Project description

latest release PyPI version https://img.shields.io/docker/pulls/femtopixel/google-closure-compiler.svg https://img.shields.io/docker/stars/femtopixel/google-closure-compiler.svg https://img.shields.io/docker/pulls/femtopixel/google-closure-compiler-app.svg https://img.shields.io/docker/stars/femtopixel/google-closure-compiler-app.svg Bitcoin donation Litecoin donation PayPal donation Beerpay donation

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page