From 8e286561550f36fe62f732b129b95d0344808280 Mon Sep 17 00:00:00 2001 From: ding Date: Thu, 28 Jul 2022 09:58:00 +0800 Subject: [PATCH] Add d.ts option in generate_js_bytecode.py Add d.ts option in ts2panda/generate_js_bytecode.py Add a commont in es2panda/generate_js_bytecode.py Issue:https://gitee.com/openharmony/arkcompiler_ets_frontend/issues/I5JA5T Signed-off-by: ding Change-Id: Ic90da5a54b70bda9170177e92feb4158811ea8df --- es2panda/scripts/generate_js_bytecode.py | 3 ++- ts2panda/scripts/generate_js_bytecode.py | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/es2panda/scripts/generate_js_bytecode.py b/es2panda/scripts/generate_js_bytecode.py index f3afc4dfc8..668a50da0a 100755 --- a/es2panda/scripts/generate_js_bytecode.py +++ b/es2panda/scripts/generate_js_bytecode.py @@ -65,8 +65,9 @@ def gen_abc_info(input_arguments): if input_arguments.commonjs: src_index = cmd.index(input_arguments.src_js) # insert commonjs option to cmd later + # insert d.ts option to cmd later run_command(cmd, path) if __name__ == '__main__': - gen_abc_info(parse_args()) \ No newline at end of file + gen_abc_info(parse_args()) diff --git a/ts2panda/scripts/generate_js_bytecode.py b/ts2panda/scripts/generate_js_bytecode.py index 5335f46cec..2eb149f122 100755 --- a/ts2panda/scripts/generate_js_bytecode.py +++ b/ts2panda/scripts/generate_js_bytecode.py @@ -42,6 +42,8 @@ def parse_args(): help='whether is module') parser.add_argument("--commonjs", action='store_true', help='whether is commonjs') + parser.add_argument("--q", action='store_true', + help='whether is d.ts') arguments = parser.parse_args() return arguments @@ -88,6 +90,8 @@ def gen_abc_info(input_arguments): cmd.insert(4, '-m') if input_arguments.commonjs: cmd.insert(5, '-c') + if input_arguments.q: + cmd.insert(6, '-q') run_command(cmd, path) -- Gitee