From d2e9ce998bcdc04bc808014a49b1a69c0440b387 Mon Sep 17 00:00:00 2001 From: lifansheng Date: Sat, 16 Oct 2021 17:22:05 +0800 Subject: [PATCH] Signed-off-by: lifansheng On branch master Your branch is up to date with 'origin/master'. --- convertxml/build_ts_js.py | 21 +++++++++------------ uri/build_ts_js.py | 21 +++++++++------------ url/build_ts_js.py | 21 +++++++++------------ 3 files changed, 27 insertions(+), 36 deletions(-) diff --git a/convertxml/build_ts_js.py b/convertxml/build_ts_js.py index e15c15e..a5bad68 100755 --- a/convertxml/build_ts_js.py +++ b/convertxml/build_ts_js.py @@ -16,20 +16,17 @@ import os import platform import argparse -def parse_args(): - parser = argparse.ArgumentParser() - parser.add_argument('--dst-file', - help='the converted target file') - arguments = parser.parse_args() - return arguments - - - if __name__ == '__main__': build_path = os.path.abspath(os.path.join(os.getcwd(), "../..")) os.chdir("%s/base/compileruntime/js_api_module/convertxml" % build_path) - input_arguments = parse_args() - os.system('../../../../prebuilts/build-tools/common/nodejs/node-v12.18.4-linux-x64/bin/node ../../../../ark/ts2abc/ts2panda/node_modules/typescript/bin/tsc') - os.system('cp -r ./out/js_convertxml.js ' + input_arguments.dst_file); + + parser = argparse.ArgumentParser() + parser.add_argument('--dst-file', + help='the converted target file') + input_arguments = parser.parse_args() + + os.system('../../../../prebuilts/build-tools/common/nodejs/node-v12.18.4-linux-x64/bin/node ' + '../../../../ark/ts2abc/ts2panda/node_modules/typescript/bin/tsc') + os.system('cp -r ./out/js_convertxml.js ' + input_arguments.dst_file) os.system('rm -rf ./out') \ No newline at end of file diff --git a/uri/build_ts_js.py b/uri/build_ts_js.py index a99b687..6aec683 100755 --- a/uri/build_ts_js.py +++ b/uri/build_ts_js.py @@ -16,20 +16,17 @@ import os import platform import argparse -def parse_args(): - parser = argparse.ArgumentParser() - parser.add_argument('--dst-file', - help='the converted target file') - arguments = parser.parse_args() - return arguments - - - if __name__ == '__main__': build_path = os.path.abspath(os.path.join(os.getcwd(), "../..")) os.chdir("%s/base/compileruntime/js_api_module/uri" % build_path) - input_arguments = parse_args() - os.system('../../../../prebuilts/build-tools/common/nodejs/node-v12.18.4-linux-x64/bin/node ../../../../ark/ts2abc/ts2panda/node_modules/typescript/bin/tsc') - os.system('cp -r ./out/js_uri.js ' + input_arguments.dst_file); + + parser = argparse.ArgumentParser() + parser.add_argument('--dst-file', + help='the converted target file') + input_arguments = parser.parse_args() + + os.system('../../../../prebuilts/build-tools/common/nodejs/node-v12.18.4-linux-x64/bin/node ' + '../../../../ark/ts2abc/ts2panda/node_modules/typescript/bin/tsc') + os.system('cp -r ./out/js_uri.js ' + input_arguments.dst_file) os.system('rm -rf ./out') \ No newline at end of file diff --git a/url/build_ts_js.py b/url/build_ts_js.py index e0c6aa0..5edfb67 100755 --- a/url/build_ts_js.py +++ b/url/build_ts_js.py @@ -16,20 +16,17 @@ import os import platform import argparse -def parse_args(): - parser = argparse.ArgumentParser() - parser.add_argument('--dst-file', - help='the converted target file') - arguments = parser.parse_args() - return arguments - - - if __name__ == '__main__': build_path = os.path.abspath(os.path.join(os.getcwd(), "../..")) os.chdir("%s/base/compileruntime/js_api_module/url" % build_path) - input_arguments = parse_args() - os.system('../../../../prebuilts/build-tools/common/nodejs/node-v12.18.4-linux-x64/bin/node ../../../../ark/ts2abc/ts2panda/node_modules/typescript/bin/tsc') - os.system('cp -r ./out/js_url.js ' + input_arguments.dst_file); + + parser = argparse.ArgumentParser() + parser.add_argument('--dst-file', + help='the converted target file') + input_arguments = parser.parse_args() + + os.system('../../../../prebuilts/build-tools/common/nodejs/node-v12.18.4-linux-x64/bin/node ' + '../../../../ark/ts2abc/ts2panda/node_modules/typescript/bin/tsc') + os.system('cp -r ./out/js_url.js ' + input_arguments.dst_file) os.system('rm -rf ./out') \ No newline at end of file