Skip to content

Commit a5c386d

Browse files
codebyteretargos
authored andcommitted
tools: add option to use custom template with js2c.py
PR-URL: #21187 Reviewed-By: Anna Henningsen <[email protected]>
1 parent e92b89a commit a5c386d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/js2c.py

+4
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,10 @@ def JS2C(source, target):
330330
def main():
331331
natives = sys.argv[1]
332332
source_files = sys.argv[2:]
333+
if source_files[-2] == '-t':
334+
global TEMPLATE
335+
TEMPLATE = source_files[-1]
336+
source_files = source_files[:-2]
333337
JS2C(source_files, [natives])
334338

335339
if __name__ == "__main__":

0 commit comments

Comments
 (0)