summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorShelley Vohr <shelley.vohr@gmail.com>2018-06-07 13:28:36 +0200
committerAnna Henningsen <anna@addaleax.net>2018-06-11 19:20:17 +0200
commitfa2d0a117e0882c5f5d9e0e9b596b8628b6b533f (patch)
treeeac2863927888a921f06b9f74526204ce281b950 /tools
parent7169181a0dfed8794047f6089e696adb31b1a65a (diff)
downloadnode-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-xtools/js2c.py4
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__":