summaryrefslogtreecommitdiffstats
path: root/minify_web_js.py
diff options
context:
space:
mode:
authorDjLegolas <DjLegolas@users.noreply.github.com>2018-10-05 01:25:34 +0200
committerCalum Lind <calumlind@gmail.com>2018-10-08 13:13:21 +0200
commit0ed3554f95196f1c23dcd95275ba550f7698cff4 (patch)
tree640fc5c573d4aaf6427f61c9509a87043ccddbad /minify_web_js.py
parent[Notifications] Set notification desktop entry hint (diff)
downloaddeluge-0ed3554f95196f1c23dcd95275ba550f7698cff4.tar.xz
deluge-0ed3554f95196f1c23dcd95275ba550f7698cff4.zip
[WebUI] Copy non-minified JS file if slimit missing
This will remove the setup dependency in "slimit" package. In case "slimit" is missing, the non-minified JS files will be copied as is to the build. "slimit" is marked as a dependency for development process only.
Diffstat (limited to 'minify_web_js.py')
-rwxr-xr-xminify_web_js.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/minify_web_js.py b/minify_web_js.py
index 4d65c197b..94c39d7c8 100755
--- a/minify_web_js.py
+++ b/minify_web_js.py
@@ -57,7 +57,10 @@ if module_exists('closure'):
elif module_exists('slimit'):
from slimit import minify
else:
- raise ImportError('Requires "slimit" package for minifying WebUI files.')
+ print('WARNING: Unable to minify js files. They will be copied as is.')
+
+ def minify(text):
+ return text
def source_files_list(source_dir):