From 88ec61cb2dd3ab88498b68d46e4a5de7d61e399a Mon Sep 17 00:00:00 2001 From: lichenshuai Date: Thu, 14 Oct 2021 14:41:51 +0800 Subject: [PATCH] Add support for -m (module) parameter. Signed-off-by: lichenshuai --- ts2panda/scripts/generate_js_bytecode.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ts2panda/scripts/generate_js_bytecode.py b/ts2panda/scripts/generate_js_bytecode.py index d330635db0..755b07a6da 100755 --- a/ts2panda/scripts/generate_js_bytecode.py +++ b/ts2panda/scripts/generate_js_bytecode.py @@ -38,6 +38,8 @@ def parse_args(): help='path to node-modules exetuable') parser.add_argument("--debug", action='store_true', help='whether add debuginfo') + parser.add_argument("--module", action='store_true', + help='whether is module') arguments = parser.parse_args() return arguments @@ -80,6 +82,8 @@ def gen_abc_info(input_arguments): if input_arguments.debug: cmd.insert(3, '--debug') + if input_arguments.module: + cmd.insert(4, '-m') run_command(cmd, path) -- Gitee