diff options
Diffstat (limited to 'minify.py')
-rwxr-xr-x | minify.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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() |