diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-09-18 20:33:10 -0500 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-09-18 20:33:10 -0500 |
commit | 552ad1f926c18e537b0baddd557679fb80e183bc (patch) | |
tree | 5f93e6ac4037585bd3c3731092e72cdf05959992 /tools/js_optimizer.py | |
parent | 7320a8876a8af7a56f4d782b8403841d40d55d99 (diff) |
allow js_optimizer.py to run standalone
Diffstat (limited to 'tools/js_optimizer.py')
-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 a11da7f0..50ae4f51 100644 --- a/tools/js_optimizer.py +++ b/tools/js_optimizer.py @@ -367,6 +367,9 @@ EMSCRIPTEN_FUNCS(); return filename -def run(filename, passes, js_engine, jcache, source_map=False, extra_info=None): +def run(filename, passes, js_engine=shared.NODE_JS, jcache=False, source_map=False, extra_info=None): return temp_files.run_and_clean(lambda: run_on_js(filename, passes, js_engine, jcache, source_map, extra_info)) +if __name__ == '__main__': + run(sys.argv[1], sys.argv[2:]) + |