diff options
author | Shelley Vohr <shelley.vohr@gmail.com> | 2018-06-07 13:28:36 +0200 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2018-06-11 19:20:17 +0200 |
commit | fa2d0a117e0882c5f5d9e0e9b596b8628b6b533f (patch) | |
tree | eac2863927888a921f06b9f74526204ce281b950 /tools | |
parent | 7169181a0dfed8794047f6089e696adb31b1a65a (diff) | |
download | node-new-fa2d0a117e0882c5f5d9e0e9b596b8628b6b533f.tar.gz |
tools: add option to use custom template with js2c.py
PR-URL: https://github.com/nodejs/node/pull/21187
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/js2c.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/js2c.py b/tools/js2c.py index 8685722c13..38cf39f816 100755 --- a/tools/js2c.py +++ b/tools/js2c.py @@ -330,6 +330,10 @@ def JS2C(source, target): def main(): natives = sys.argv[1] source_files = sys.argv[2:] + if source_files[-2] == '-t': + global TEMPLATE + TEMPLATE = source_files[-1] + source_files = source_files[:-2] JS2C(source_files, [natives]) if __name__ == "__main__": |