The tool allows also:
- Create initial configuration files from html files
- Reemplace in html script tags by minimized ones.
The project is open source.
You can install jspack like a simple python egg:
- Using easy_install: easy_install jstools
- Using pip: pip install jstools
- If you use buildout, add it to the eggs list in your buildout.cfg, or as a dependency of one of your own packages in setup.py.
The code is available in the jspack repo
If you have a config file (test.cfg) like:
[DEFAULT] minimizer = jsmin [concatenated.js] # yui compressor minimizer = inout: java -jar compressor.jar --type js # Can be used to replace the js tags html = test.html files = file/relative/to/root.js /absolute/file.js [compressed.js] minimizer = slimit files = file/relative/to/root.js js/two.js [css/all.css] root = css minimizer = none files = one.css two.css
And generates concatenated.js, compressed.js and css/all.css
If root option is not specified, the relative files are considered relative to the config parent directory (test.cfg).
You can use the help:
- CSS links replacement in html files
- Better documentation
- The project is hosted in bitbucked now. I had issues with hg-git plugin.
- Css link replace feature.
- Support for several tools (yui compressor) using inout in minimizer
- Verbose mode
- Updated documentation: new link to github project
- Replace command
- Multiple mimimizers
- Initial release
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.