mirror of
https://github.com/openharmony/js_api_module.git
synced 2026-08-24 22:21:26 -04:00
add the relative_path argument to adapter the root_build_dir Signed-off-by: chuxuezhe111 <hanjixiao@huawei.com>
This commit is contained in:
committed by
chuxuezhe11
parent
b78cc0acfd
commit
2c21aa6086
+3
-1
@@ -37,9 +37,11 @@ if __name__ == '__main__':
|
|||||||
help='the module path')
|
help='the module path')
|
||||||
PARSER_INST.add_argument('--out-file',
|
PARSER_INST.add_argument('--out-file',
|
||||||
help='js output 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()
|
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)
|
os.chdir(("%s" + INPUT_ARGUMENTS.module_path) % BUILD_PATH)
|
||||||
NODE_PATH = '../../../../prebuilts/build-tools/common/nodejs/\
|
NODE_PATH = '../../../../prebuilts/build-tools/common/nodejs/\
|
||||||
node-v12.18.4-linux-x64/bin/node'
|
node-v12.18.4-linux-x64/bin/node'
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ action("build_ts_js") {
|
|||||||
rebase_path("/base/compileruntime/js_api_module/convertxml"),
|
rebase_path("/base/compileruntime/js_api_module/convertxml"),
|
||||||
"--out-file",
|
"--out-file",
|
||||||
rebase_path("./out/js_convertxml.js"),
|
rebase_path("./out/js_convertxml.js"),
|
||||||
|
"--relative-path",
|
||||||
|
rebase_path("//", root_build_dir),
|
||||||
]
|
]
|
||||||
depfile = "$target_gen_dir/$target_name.d"
|
depfile = "$target_gen_dir/$target_name.d"
|
||||||
outputs = [ target_out_dir + "/js_convertxml.js" ]
|
outputs = [ target_out_dir + "/js_convertxml.js" ]
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ action("build_ts_js") {
|
|||||||
rebase_path("/base/compileruntime/js_api_module/uri"),
|
rebase_path("/base/compileruntime/js_api_module/uri"),
|
||||||
"--out-file",
|
"--out-file",
|
||||||
rebase_path("./out/js_uri.js"),
|
rebase_path("./out/js_uri.js"),
|
||||||
|
"--relative-path",
|
||||||
|
rebase_path("//", root_build_dir),
|
||||||
]
|
]
|
||||||
depfile = "$target_gen_dir/$target_name.d"
|
depfile = "$target_gen_dir/$target_name.d"
|
||||||
outputs = [ target_out_dir + "/js_uri.js" ]
|
outputs = [ target_out_dir + "/js_uri.js" ]
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ action("build_ts_js") {
|
|||||||
rebase_path("/base/compileruntime/js_api_module/url"),
|
rebase_path("/base/compileruntime/js_api_module/url"),
|
||||||
"--out-file",
|
"--out-file",
|
||||||
rebase_path("./out/js_url.js"),
|
rebase_path("./out/js_url.js"),
|
||||||
|
"--relative-path",
|
||||||
|
rebase_path("//", root_build_dir),
|
||||||
]
|
]
|
||||||
depfile = "$target_gen_dir/$target_name.d"
|
depfile = "$target_gen_dir/$target_name.d"
|
||||||
outputs = [ target_out_dir + "/js_url.js" ]
|
outputs = [ target_out_dir + "/js_url.js" ]
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ action("build_ts_js") {
|
|||||||
rebase_path("/base/compileruntime/js_api_module/xml"),
|
rebase_path("/base/compileruntime/js_api_module/xml"),
|
||||||
"--out-file",
|
"--out-file",
|
||||||
rebase_path("./out/js_xml.js"),
|
rebase_path("./out/js_xml.js"),
|
||||||
|
"--relative-path",
|
||||||
|
rebase_path("//", root_build_dir),
|
||||||
]
|
]
|
||||||
depfile = "$target_gen_dir/$target_name.d"
|
depfile = "$target_gen_dir/$target_name.d"
|
||||||
outputs = [ target_out_dir + "/js_xml.js" ]
|
outputs = [ target_out_dir + "/js_xml.js" ]
|
||||||
|
|||||||
Reference in New Issue
Block a user