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:
parent
7169181a0d
commit
fa2d0a117e
@ -330,6 +330,10 @@ def JS2C(source, target):
|
|||||||
def main():
|
def main():
|
||||||
natives = sys.argv[1]
|
natives = sys.argv[1]
|
||||||
source_files = sys.argv[2:]
|
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])
|
JS2C(source_files, [natives])
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user