diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-03-08 18:59:39 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-03-08 18:59:39 -0800 |
commit | f1bbf0244b08dce2c2bfb9fc507d6088dcb6a596 (patch) | |
tree | d0b55ec68db5becd4434676a25608e825ca8d9ba | |
parent | 0d0ce4f677f293697123d4e237ca446dbc3fcc27 (diff) |
save 0.0 in asm shell minification
-rw-r--r-- | tools/js_optimizer.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/js_optimizer.py b/tools/js_optimizer.py index fda5e77d..f8dfddf2 100644 --- a/tools/js_optimizer.py +++ b/tools/js_optimizer.py @@ -66,6 +66,8 @@ class Minifier: # to minify all global names, we receive a dictionary back, which is then # used by the function processors + shell = shell.replace('0.0', '13371337') # avoid uglify doing 0.0 => 0 + # Find all globals in the JS functions code self.globs = [m.group(2) for m in func_sig.finditer(self.js)] @@ -82,7 +84,8 @@ class Minifier: #print >> sys.stderr, "minified SHELL 3333333333333333", output, "\n44444444444444444444" code, metadata = output.split('// MINIFY_INFO:') self.globs = json.loads(metadata) - return code + return code.replace('13371337', '0.0') + def serialize(self): return json.dumps({ |