aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorFraser Adams <fraser.adams@blueyonder.co.uk>2014-01-06 14:49:50 +0000
committerFraser Adams <fraser.adams@blueyonder.co.uk>2014-01-06 14:49:50 +0000
commit3bdbd008f9f95e6a1d8da42e61a751289db17b60 (patch)
tree2dab07ecaf099c22750bc9b954e17b9944411723 /tools
parent385a660a1868dc1777b251dfcf83371ccd388b02 (diff)
changed != to !== in a couple of places. Added fix to prevent closure minifying crypto randomBytes etc. this fix makes use of closure externs so I've added a closure-externs.js to hold the definitions and modified tools/shared.py closure_compiler method to point to closure-externs.js. I've added externs to fix minification of the ws library used in library_sockfs.js too
Diffstat (limited to 'tools')
-rw-r--r--tools/shared.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/shared.py b/tools/shared.py
index 5b8d43aa..1557acb7 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -1382,6 +1382,8 @@ class Building:
if not os.path.exists(CLOSURE_COMPILER):
raise Exception('Closure compiler appears to be missing, looked at: ' + str(CLOSURE_COMPILER))
+ CLOSURE_EXTERNS = path_from_root('src', 'closure-externs.js')
+
# Something like this (adjust memory as needed):
# java -Xmx1024m -jar CLOSURE_COMPILER --compilation_level ADVANCED_OPTIMIZATIONS --variable_map_output_file src.cpp.o.js.vars --js src.cpp.o.js --js_output_file src.cpp.o.cc.js
args = [JAVA,
@@ -1389,6 +1391,7 @@ class Building:
'-jar', CLOSURE_COMPILER,
'--compilation_level', 'ADVANCED_OPTIMIZATIONS',
'--language_in', 'ECMASCRIPT5',
+ '--externs', CLOSURE_EXTERNS,
#'--variable_map_output_file', filename + '.vars',
'--js', filename, '--js_output_file', filename + '.cc.js']
if pretty: args += ['--formatting', 'PRETTY_PRINT']