Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install c2c.recipe.closurecompile

How to install c2c.recipe.closurecompile

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install c2c.recipe.closurecompile
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.3.1
0.3.3Never BuiltWhy not?
0.3.1 Available View build log
0.3 Available View build log
0.2.1 Available View build log
0.2 Available View build log
0.1 Available View build log
Windows (64-bit)
0.3.1
0.3.3Never BuiltWhy not?
0.3.1 Available View build log
0.3 Available View build log
0.2.1 Available View build log
0.2 Available View build log
0.1 Available View build log
Mac OS X (10.5+)
0.3.1
0.3.3Never BuiltWhy not?
0.3.1 Available View build log
0.3 Available View build log
0.2.1 Available View build log
0.2 Available View build log
0.1 Available View build log
Linux (32-bit)
0.3.1
0.3.3Never BuiltWhy not?
0.3.1 Available View build log
0.3 Available View build log
0.2.1 Available View build log
0.2 Available View build log
0.1 Available View build log
Linux (64-bit)
0.3.3 Available View build log
0.3.1 Available View build log
0.3 Available View build log
0.2.1 Available View build log
0.2 Available View build log
0.1 Available View build log
 
License
MIT License
Dependencies
Imports
Lastest release
version 0.3.3 on Jan 9th, 2014

Compress javascript files using the Google Closure Compiler

Usage

Minimal buildout config example:

[buildout]
parts = closure-compile

[closure-compile]
recipe = c2c.recipe.closurecompile
compiler = path/to/closure-compiler.jar
level = SIMPLE_OPTIMIZATIONS
source_map = foo/bar.map
externs = externs/a.js externs/b.js
input = foo/bar.js
output = foo/bar.min.js
output_mode = compiled
compiler_flags = --generate_exports

Where:

  • compiler: The location of the compiler jar file.
  • level: The compilation level: WHITESPACE_ONLY, SIMPLE_OPTIMIZATIONS or ADVANCED_OPTIMIZATIONS. Default is WHITESPACE_ONLY.
  • source_map: Path to the source map file. Optional.
  • externs: A list of optional externs files.
  • input: The files to compress separated with spaces. The path can be absolute or relative to the buildout directory. These files are also used to calculate the dependencies in addition to the namespace option.
  • root: The list of paths that should be traversed to build the dependencies.
  • namespace: One or more namespaces to calculate dependencies for.
  • output: The path to the minified file.
  • output_mode: The type of output to generate from this script. Options are "list" for a list of filenames, "script" for a single script containing the contents of all the files, or "compiled" to produce compiled output with the Closure Compiler. Default is "compiled".
  • compiler_flags: A space seperated list of additional compiler flags for the Closure Compiler. They are passed to the compiler as specified. Optional.

depswriter

Writes dependency files with DepsWriter.

Minimal buildout config example:

[buildout]
parts = depswriter

[closure-compile]
recipe = c2c.recipe.closurecompile:depswriter
root_with_prefix = myproject ../../myproject
                   ../source/ ../../../../source/
output = path/to/deps.js

Where:

  • root_with_prefix: A list of paths and prefixes.
  • output: The path to the dependency file, can be absolute or relative to the buildout directory.

Note that the root and the path_with_depspath options from the original depswriter.py script are not yet supported.

Getting the jar

To automatically download and unzip the compiler from Google, you can use the hexagonit.recipe.download receipt:

[buildout]
parts = closure-compile

[closure-compile]
recipe = c2c.recipe.closurecompile
compiler = ${download-closure-compile:destination}/compiler.jar
...

[download-closure-compile]
recipe = hexagonit.recipe.download
url = http://closure-compiler.googlecode.com/files/compiler-latest.zip

Subscribe to package updates

Last updated Jan 9th, 2014

Download Stats

Last month:5

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.