google closure编译器cli api
google-closure-compiler-api的Python项目详细描述
此图像允许您在cli中使用Google Closure Compiler API编译js代码
安装
pip3 install google_closure_compiler_api
用法
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
默认值
- –js:/dev/stdin(输入代码)
- –js_output_文件:dev/stdout(在shell中打印编译的代码)
- –编译级:仅空白
Docker用法
docker run --rm -ti -v /path/to/my/file.js:/root/myfile.js femtopixel/google-closure-compiler --js /root/myfile.js