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>
This commit is contained in:
Shelley Vohr 2018-06-07 13:28:36 +02:00 committed by Anna Henningsen
parent 7169181a0d
commit fa2d0a117e
No known key found for this signature in database
GPG Key ID: 9C63F3A6CD2AD8F9

View File

@ -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__":