Signed-off-by: wangchun17 <chunn.wang@huawei.com>
Change-Id: I2e1628bd4f8d44aa2c5fa07c571ce7145d9b9865
This commit is contained in:
wangchun17
2021-10-20 11:46:18 +08:00
parent e8221ec4f2
commit a4c5876411
4 changed files with 32 additions and 13 deletions
+19 -7
View File
@@ -8,18 +8,23 @@ ace_loader_lib_dir =
get_label_info(":build_ace_loader_library", "target_out_dir") + "/lib"
action("build_ace_loader_library") {
script = "//developtools/ace-js2bundle/build_ace_loader_library.py"
script = "build_ace_loader_library.py"
depfile = "$target_gen_dir/$target_name.d"
outputs = [ ace_loader_lib_dir ]
_ace_loader_dir = "//developtools/ace-js2bundle/ace-loader"
_ace_loader_dir = "ace-loader"
_module_source_js = _ace_loader_dir + "/module-source.js"
_babel_js = _ace_loader_dir + "/node_modules/@babel/cli/bin/babel.js"
_babel_config_js = _ace_loader_dir + "/babel.config.js"
_uglify_source_js = _ace_loader_dir + "/uglify-source.js"
if (is_standard_system) {
_ace_config_dir = "ace-loader"
} else {
_ace_config_dir = "//prebuilts/ace-toolkit/ace-loader/linux-x64"
}
_babel_js = _ace_config_dir + "/node_modules/@babel/cli/bin/babel.js"
inputs = [
_babel_config_js,
_babel_js,
@@ -29,10 +34,17 @@ action("build_ace_loader_library") {
# different host platform nodejs tool directory
if (host_os == "linux") {
nodejs_path =
"//prebuilts/build-tools/common/nodejs/node-v12.18.4-linux-x64/bin/node"
if (is_standard_system) {
nodejs_path = "//prebuilts/build-tools/common/nodejs/node-v12.18.4-linux-x64/bin/node"
} else {
nodejs_path = "//prebuilts/ace-toolkit/nodejs/node-v12.18.4-linux-x64/bin/node"
}
} else if (host_os == "mac") {
nodejs_path = "//prebuilts/build-tools/common/nodejs/node-v12.18.4-darwin-x64/bin/node"
if (is_standard_system) {
nodejs_path = "//prebuilts/build-tools/common/nodejs/node-v12.18.4-darwin-x64/bin/node"
} else {
nodejs_path = "//prebuilts/ace-toolkit/nodejs/node-v12.18.4-darwin-x64/bin/node"
}
} else {
assert(false, "Unsupported host_os: $host_os")
}
+3 -3
View File
@@ -68,6 +68,6 @@ function copyResource(src, dist) {
copyResource(path.resolve(__dirname, './plugin/templater'), process.argv[2] + '/templater');
copyResource(path.resolve(__dirname, './plugin/theme'), process.argv[2] + '/theme');
copyResource(path.resolve(__dirname, './plugin/codegen'), process.argv[2] + '/codegen');
copyResource(path.resolve(__dirname, '../../../third_party/weex-loader/deps/weex-scripter'), process.argv[2] + '/scripter');
copyResource(path.resolve(__dirname, '../../../third_party/weex-loader/deps/weex-styler'), process.argv[2] + '/styler');
copyResource(path.resolve(__dirname, '../../../third_party/parse5/packages/parse5/lib'), process.argv[2] + '/parse');
copyResource(path.resolve(__dirname, './third_party/weex-loader/deps/weex-scripter'), process.argv[2] + '/scripter');
copyResource(path.resolve(__dirname, './third_party/weex-loader/deps/weex-styler'), process.argv[2] + '/styler');
copyResource(path.resolve(__dirname, './third_party/parse5/packages/parse5/lib'), process.argv[2] + '/parse');
+1
View File
@@ -0,0 +1 @@
../../../../third_party/parse5/
+9 -3
View File
@@ -18,9 +18,15 @@ import sys
import subprocess
import argparse
sys.path.append(
os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, 'build'))
from scripts.util import build_utils # noqa: E402
standard_system_build_dir = os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, 'build')
build_dir = os.path.join(os.path.dirname(__file__), os.pardir, os.pardir,
os.pardir, os.pardir, os.pardir, 'build')
if os.path.exists(standard_system_build_dir):
sys.path.append(standard_system_build_dir)
from scripts.util import build_utils # noqa: E402
if os.path.exists(build_dir):
sys.path.append(build_dir)
from maple.java.util import build_utils # noqa: E402
def parse_args():