From d5a826156b255ac4ec1f1168dba9b93f79f0dd9a Mon Sep 17 00:00:00 2001 From: DaiH Date: Tue, 7 Jun 2022 21:02:36 +0800 Subject: [PATCH] Modificationg of adaptive building option for cjs --------------------------------------------------- Modificationg of adaptive building option for cjs issue: https://gitee.com/openharmony/ark_js_runtime/issues/I5590V Signed-off-by: DaiH Change-Id: I56b637b089250487a74ae321e70c24ba32985e40 --- 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 755b07a6da..5335f46cec 100755 --- a/ts2panda/scripts/generate_js_bytecode.py +++ b/ts2panda/scripts/generate_js_bytecode.py @@ -40,6 +40,8 @@ def parse_args(): help='whether add debuginfo') parser.add_argument("--module", action='store_true', help='whether is module') + parser.add_argument("--commonjs", action='store_true', + help='whether is commonjs') arguments = parser.parse_args() return arguments @@ -84,6 +86,8 @@ def gen_abc_info(input_arguments): cmd.insert(3, '--debug') if input_arguments.module: cmd.insert(4, '-m') + if input_arguments.commonjs: + cmd.insert(5, '-c') run_command(cmd, path) -- Gitee