mirror of
https://gitee.com/openharmony/js_api_module
synced 2024-11-27 06:31:12 +00:00
!104 add the relative_path argument to adapter the root_build_dir
Merge pull request !104 from chuxuezhe11/master
This commit is contained in:
commit
f872868cd6
@ -37,9 +37,11 @@ if __name__ == '__main__':
|
||||
help='the module path')
|
||||
PARSER_INST.add_argument('--out-file',
|
||||
help='js output file')
|
||||
PARSER_INST.add_argument('--relative-path',
|
||||
help='the code root path relative the root_build_dir')
|
||||
INPUT_ARGUMENTS = PARSER_INST.parse_args()
|
||||
|
||||
BUILD_PATH = os.path.abspath(os.path.join(os.getcwd(), "../.."))
|
||||
BUILD_PATH = os.path.abspath(os.path.join(os.getcwd(), INPUT_ARGUMENTS.relative_path))
|
||||
os.chdir(("%s" + INPUT_ARGUMENTS.module_path) % BUILD_PATH)
|
||||
NODE_PATH = '../../../../prebuilts/build-tools/common/nodejs/\
|
||||
node-v12.18.4-linux-x64/bin/node'
|
||||
@ -55,4 +57,4 @@ typescript/bin/tsc'
|
||||
|
||||
CMD_INST = shutil.rmtree('./out')
|
||||
|
||||
exit(0)
|
||||
exit(0)
|
||||
|
@ -26,6 +26,8 @@ action("build_ts_js") {
|
||||
rebase_path("/base/compileruntime/js_api_module/convertxml"),
|
||||
"--out-file",
|
||||
rebase_path("./out/js_convertxml.js"),
|
||||
"--relative-path",
|
||||
rebase_path("//", root_build_dir),
|
||||
]
|
||||
depfile = "$target_gen_dir/$target_name.d"
|
||||
outputs = [ target_out_dir + "/js_convertxml.js" ]
|
||||
|
@ -25,6 +25,8 @@ action("build_ts_js") {
|
||||
rebase_path("/base/compileruntime/js_api_module/uri"),
|
||||
"--out-file",
|
||||
rebase_path("./out/js_uri.js"),
|
||||
"--relative-path",
|
||||
rebase_path("//", root_build_dir),
|
||||
]
|
||||
depfile = "$target_gen_dir/$target_name.d"
|
||||
outputs = [ target_out_dir + "/js_uri.js" ]
|
||||
|
@ -25,6 +25,8 @@ action("build_ts_js") {
|
||||
rebase_path("/base/compileruntime/js_api_module/url"),
|
||||
"--out-file",
|
||||
rebase_path("./out/js_url.js"),
|
||||
"--relative-path",
|
||||
rebase_path("//", root_build_dir),
|
||||
]
|
||||
depfile = "$target_gen_dir/$target_name.d"
|
||||
outputs = [ target_out_dir + "/js_url.js" ]
|
||||
|
@ -27,6 +27,8 @@ action("build_ts_js") {
|
||||
rebase_path("/base/compileruntime/js_api_module/xml"),
|
||||
"--out-file",
|
||||
rebase_path("./out/js_xml.js"),
|
||||
"--relative-path",
|
||||
rebase_path("//", root_build_dir),
|
||||
]
|
||||
depfile = "$target_gen_dir/$target_name.d"
|
||||
outputs = [ target_out_dir + "/js_xml.js" ]
|
||||
|
Loading…
Reference in New Issue
Block a user