aboutsummaryrefslogtreecommitdiff
path: root/minify.py
blob: 52d27a69cb6cc3f577377f2d589628b1d6c675a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
from jsmin import jsmin
import os
minified = ""

for filename in os.listdir('scripts'):
    if not os.path.isdir(os.path.join('scripts', filename)):
        with open(os.path.join('scripts', filename)) as js_file:
            minified += jsmin(js_file.read())
with open('media/js/package.min.js', 'w') as jscompressed:
    jscompressed.write(minified)
    jscompressed.close()