Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
third_party_jsframework
提交
2d76b575
T
third_party_jsframework
项目概览
OpenHarmony
/
third_party_jsframework
9 个月 前同步成功
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
third_party_jsframework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
2d76b575
编写于
11月 22, 2022
作者:
O
openharmony_ci
提交者:
Gitee
11月 22, 2022
浏览文件
操作
浏览文件
下载
差异文件
!764 自动生成mock在gn中隔离,仅编译预览器引擎时编译
Merge pull request !764 from fupengfei/master
上级
763dc3e3
40289c8b
变更
5
展开全部
隐藏空白更改
内联
并排
Showing
5 changed file
with
1840 addition
and
1825 deletion
+1840
-1825
BUILD.gn
BUILD.gn
+5
-0
js_framework_build.sh
js_framework_build.sh
+15
-5
runtime/main/extend/systemplugin/napi/index.js
runtime/main/extend/systemplugin/napi/index.js
+4
-4
runtime/main/extend/systemplugin/napi/webgl/webgl.js
runtime/main/extend/systemplugin/napi/webgl/webgl.js
+1047
-1047
runtime/main/extend/systemplugin/napi/webgl/webgl2.js
runtime/main/extend/systemplugin/napi/webgl/webgl2.js
+769
-769
未找到文件。
BUILD.gn
浏览文件 @
2d76b575
...
...
@@ -35,6 +35,10 @@ action("gen_snapshot") {
js_framework = "//third_party/jsframework/runtime"
js_framework_mock_generate = "//third_party/jsframework/mock-generate"
is_mac = "false"
is_preview_engine = "false"
if (use_mingw_win || use_mac || use_linux) {
is_preview_engine = "true"
}
use_mac = host_os == "mac"
if (is_standard_system || is_cross_platform_build) {
...
...
@@ -85,6 +89,7 @@ action("gen_snapshot") {
rebase_path(buildfile_native_min, root_build_dir),
rebase_path(css_what, root_build_dir),
rebase_path(js_framework_mock_generate, root_build_dir),
is_preview_engine,
]
inputs = [
...
...
js_framework_build.sh
浏览文件 @
2d76b575
...
...
@@ -21,10 +21,14 @@ prebuilts_path=${12}
# copy runtime to target out, and runtime/css-what is solt link, copy it always follow symbolic links in SOURCE
if
[
"
${
11
}
"
==
'true'
]
;
then
cp
-R
-L
$3
$9
cp
-R
${
15
}
$9
if
[
"
${
16
}
"
==
'true'
]
;
then
cp
-R
${
15
}
$9
fi
else
cp
-r
-L
$3
$9
cp
-r
${
15
}
$9
if
[
"
${
16
}
"
==
'true'
]
;
then
cp
-r
${
15
}
$9
fi
fi
# $2 => node $4 => node_modules
...
...
@@ -57,14 +61,18 @@ if [ -d "$prebuilts_path" ]; then
cp
-r
$2
$9
cd
$9
if
[
"
${
11
}
"
==
'true'
]
;
then
./node-v12.18.4-darwin-x64/bin/node ./mock-generate/build.js
if
[
"
${
16
}
"
==
'true'
]
;
then
./node-v12.18.4-darwin-x64/bin/node ./mock-generate/build.js
fi
./node-v12.18.4-darwin-x64/bin/node build_jsmock_system_plugin.js
||
exit
1 &
./node-v12.18.4-darwin-x64/bin/node build_strip_native_min.js
||
exit
1 &
# run unit test
./node-v12.18.4-darwin-x64/bin/node node_modules/.bin/mocha
-r
ts-node/register
test
/lib.ts
test
/ut/
**
/
*
.ts
test
/ut/
*
.ts
||
exit
1 &
wait
else
./node-v12.18.4-linux-x64/bin/node ./mock-generate/build.js
if
[
"
${
16
}
"
==
'true'
]
;
then
./node-v12.18.4-linux-x64/bin/node ./mock-generate/build.js
fi
./node-v12.18.4-linux-x64/bin/node build_jsmock_system_plugin.js
||
exit
1 &
./node-v12.18.4-linux-x64/bin/node build_strip_native_min.js
||
exit
1 &
# run unit test
...
...
@@ -92,4 +100,6 @@ rm -rf ./test
rm
-rf
./.eslintrc
rm
-rf
./.babelrc
rm
-rf
./package.json
rm
-rf
./mock-generate
if
[
"
${
16
}
"
==
'true'
]
;
then
rm
-rf
./mock-generate
fi
runtime/main/extend/systemplugin/napi/index.js
浏览文件 @
2d76b575
...
...
@@ -58,8 +58,8 @@ import { mockBatteryStatistics } from './ohos_batteryStatistics'
import
{
mockIntl
}
from
'
./ohos_intl
'
import
{
mockI18N
}
from
'
./ohos_i18n
'
import
{
mockRpc
}
from
'
./ohos_rpc
'
import
{
mock
webgl
}
from
'
.
/webgl
'
import
{
mock
webgl2
}
from
'
.
/webgl2
'
import
{
mock
Webgl
}
from
'
./webgl
/webgl
'
import
{
mock
Webgl2
}
from
'
./webgl
/webgl2
'
import
{
mockProcess
}
from
'
./ohos_process
'
import
{
mockUrl
}
from
'
./ohos_url
'
import
{
mockHiAppEvent
}
from
'
./ohos_hiAppEvent
'
...
...
@@ -387,9 +387,9 @@ export function mockRequireNapiFun() {
case
"
rpc
"
:
return
mockRpc
();
case
"
webgl
"
:
return
mock
w
ebgl
();
return
mock
W
ebgl
();
case
"
webgl2
"
:
return
mock
w
ebgl2
();
return
mock
W
ebgl2
();
case
"
process
"
:
return
mockProcess
();
case
"
url
"
:
...
...
runtime/main/extend/systemplugin/napi/webgl.js
→
runtime/main/extend/systemplugin/napi/webgl
/webgl
.js
100755 → 100644
浏览文件 @
2d76b575
此差异已折叠。
点击以展开。
runtime/main/extend/systemplugin/napi/webgl2.js
→
runtime/main/extend/systemplugin/napi/webgl
/webgl
2.js
100755 → 100644
浏览文件 @
2d76b575
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录