aboutsummaryrefslogtreecommitdiff
path: root/minify.py
diff options
context:
space:
mode:
Diffstat (limited to 'minify.py')
-rwxr-xr-xminify.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/minify.py b/minify.py
new file mode 100755
index 0000000..6ce2775
--- /dev/null
+++ b/minify.py
@@ -0,0 +1,10 @@
+from jsmin import jsmin
+import os
+minified = ""
+
+for filename in os.listdir('scripts'):
+ 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()