https://github.com/spiderpig86/pyclosure
:gear: A CLI app that supports batch compilations using the Closure compiler.
https://github.com/spiderpig86/pyclosure
closure closure-compiler command-line-tool javascript-minification python webdevelopment
Last synced: about 1 year ago
JSON representation
:gear: A CLI app that supports batch compilations using the Closure compiler.
- Host: GitHub
- URL: https://github.com/spiderpig86/pyclosure
- Owner: Spiderpig86
- License: mit
- Created: 2019-07-27T20:35:38.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-08-06T07:19:43.000Z (almost 7 years ago)
- Last Synced: 2025-03-17T15:16:50.969Z (about 1 year ago)
- Topics: closure, closure-compiler, command-line-tool, javascript-minification, python, webdevelopment
- Language: Python
- Homepage: https://pypi.org/project/PyClosure/
- Size: 15.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
PyClosure
[](https://travis-ci.org/Spiderpig86/PyClosure)
A console application that allows you to easily compile and optimize
your JavaScript files in **batches** using the [Google Closure
Compiler](https://developers.google.com/closure/compiler/).
# Install
Run the following command.
``` sh
pip3 install pyclosure
```
# Usage
``` sh
usage: python -m pyclosure [-h] [--input ] [--output ] [--level {WHITESPACE_ONLY, SIMPLE_OPTIMIZATIONS,ADVANCED_OPTIMIZATIONS}] [--extern ]
```
### Arguments
- `-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 is `index.min.js`.)
- `--level` - the type of compilation to be used for the variables.
- Supported values:
- `WHITESPACE_ONLY`
- `SIMPLE_OPTIMIZATIONS`
- `ADVANCED_OPTIMIZATIONS`
- `--extern` (optional) - enter in variables you want in your compiled
code separated by **semi-colons**.
# Tests
The tests can be run using `python tests/test_basic.py`. Track the pipelines in [Travis CI](https://travis-ci.org/Spiderpig86/PyClosure).