aboutsummaryrefslogtreecommitdiff
path: root/minify.py
diff options
context:
space:
mode:
Diffstat (limited to 'minify.py')
-rwxr-xr-xminify.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/minify.py b/minify.py
index 6ce2775..52d27a6 100755
--- a/minify.py
+++ b/minify.py
@@ -3,8 +3,9 @@ import os
minified = ""
for filename in os.listdir('scripts'):
- with open(os.path.join('scripts', filename)) as js_file:
- minified += jsmin(js_file.read())
+ 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()