diff --git a/es2panda/scripts/generate_js_bytecode.py b/es2panda/scripts/generate_js_bytecode.py index f3afc4dfc80bba611baf18c3a1627e661080be8d..668a50da0a59da3df92264def511cd81a33ec3df 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 5335f46cec452b345455a936c2f5418c4f6d776f..2eb149f122824c5d56f354b8cc4b763914af0d35 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)