mirror of
https://gitee.com/openharmony/third_party_jsframework
synced 2024-11-23 06:40:59 +00:00
Signed-off-by: fupengfei001 <fupengfei6@huawei.com>
This commit is contained in:
parent
763dc3e308
commit
40289c8b1d
5
BUILD.gn
5
BUILD.gn
@ -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 = [
|
||||
|
@ -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
|
||||
|
@ -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 { mockwebgl } from './webgl'
|
||||
import { mockwebgl2 } from './webgl2'
|
||||
import { mockWebgl } from './webgl/webgl'
|
||||
import { mockWebgl2 } 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 mockwebgl();
|
||||
return mockWebgl();
|
||||
case "webgl2":
|
||||
return mockwebgl2();
|
||||
return mockWebgl2();
|
||||
case "process":
|
||||
return mockProcess();
|
||||
case "url":
|
||||
|
2094
runtime/main/extend/systemplugin/napi/webgl.js → runtime/main/extend/systemplugin/napi/webgl/webgl.js
Executable file → Normal file
2094
runtime/main/extend/systemplugin/napi/webgl.js → runtime/main/extend/systemplugin/napi/webgl/webgl.js
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
1538
runtime/main/extend/systemplugin/napi/webgl2.js → runtime/main/extend/systemplugin/napi/webgl/webgl2.js
Executable file → Normal file
1538
runtime/main/extend/systemplugin/napi/webgl2.js → runtime/main/extend/systemplugin/napi/webgl/webgl2.js
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user