IIFE filter for webassets
Project description
webassets-iife is a webassets filter to wrap a JavaScript bundle in an IIFE to prevent global leaks and improve minification.
Install
pip install webassets-iife
Usage
For example with Flask:
from flask.ext.assets import Environment, Bundle
from webassets_iife import IIFE
# ...
assets = Environment(app)
js = Bundle('myscript1.js',
'myscript2.js',
filters=(IIFE, 'closure_js'), output='all.min.js')
assets.register('js_all', js)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
webassets-iife-0.0.2.tar.gz
(2.6 kB
view hashes)