SkillAgentSearch skills...

Uglipyjs

Python port of the ruby uglifier gem

Install / Use

/learn @OiNutter/Uglipyjs
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

UgliPyJs

UgliPyJs is a port of the uglifier gem for python. It wraps the UglifyJS minification tool allowing you to minify your Javascript files from your Python code.

Install

$ pip install uglipyjs

Usage

To minify your javascript code:

import uglipyjs
js = open('blah.js','r').read()
uglipyjs.compile(js)

You can also minify with source map:

import uglipyjs
js = open('blah.js','r').read()
uglipyjs.compile_with_map(js)

If you need to override the defaults pass a dict of options as a second parameter to the compile function:

import uglipyjs
js = open('blah.js','r').read()
uglipyjs.compile(js,{'mangle':False})

License

Copyright 2012 Will McKenzie

UgliPyJs is licensed under the MIT License, please see the LICENSE file for more details.

View on GitHub
GitHub Stars14
CategoryDevelopment
Updated3y ago
Forks4

Languages

Python

Security Score

75/100

Audited on Sep 11, 2022

No findings