A Python script that combines JavaScript files into one large file and creates a master and minified version. Lets the developer work with multiple files and build one large include for the browser.
2012
1.0
- Initial build
- Clone CombineAndMinify into an existing project
- Add to .gitignore to exclude (GitHub)
- Edit paths in process.py
- Add files to source in files.txt.
- Run
$ python process.py
to combine and minify
process.py
fileList = 'files.txt'
jsPath = '../client/public/js/'
jsMaster = jsPath + 'master.js'
jsMinify = jsPath + 'minify.js'
files.txt
################ Comments Are Ignored ################
externaljs.js
externaljs2.js
Include master.js or minify.js in your project. All source files can be left separate and intact. After editing an include just run process.py again to rip off a new minify and master.
GNU GENERAL PUBLIC LICENSE Version 2, June 1991