@shijiu/jsview-vue 0.9.246 → 0.9.254
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dom/bin/package.json +11 -11
- package/dom/browser-root-style.css +21 -21
- package/loader/jsview-main.js +41 -41
- package/loader/jsview.config.default.js +37 -37
- package/loader/jsview.default.config.js +37 -37
- package/package.json +6 -6
- package/patches/node_modules/@babel/preset-env/lib/available-plugins.js +218 -218
- package/patches/node_modules/@vue/cli-plugin-typescript/index.js +100 -100
- package/patches/node_modules/@vue/cli-service/lib/commands/serve.js +395 -395
- package/patches/node_modules/@vue/cli-service/lib/config/app.js +272 -272
- package/patches/node_modules/@vue/cli-service/lib/config/assets.js +70 -70
- package/patches/node_modules/@vue/cli-service/lib/config/base.js +212 -212
- package/patches/node_modules/postcss-js/objectifier.js +90 -90
- package/patches/node_modules/vue-loader/dist/resolveScript.js +70 -70
- package/samples/AdvanceMetroWidget/App.vue +122 -122
- package/samples/AdvanceMetroWidget/Frame.vue +100 -100
- package/samples/AdvanceMetroWidget/Item.vue +57 -57
- package/samples/AdvanceMetroWidget/data.js +136 -136
- package/samples/AnimPicture/App.vue +223 -223
- package/samples/Basic/App.vue +128 -128
- package/samples/Basic/components/TitleBar.vue +28 -28
- package/samples/Basic/components/anim/AnimGroup.vue +67 -67
- package/samples/Basic/components/anim/AnimKeyframeBasic.vue +101 -101
- package/samples/Basic/components/anim/AnimKeyframeComposite.vue +52 -52
- package/samples/Basic/components/anim/AnimTransition.vue +116 -116
- package/samples/Basic/components/div/DivBackground.vue +14 -14
- package/samples/Basic/components/div/DivClip.vue +80 -80
- package/samples/Basic/components/div/DivCssScoped.vue +26 -26
- package/samples/Basic/components/div/DivCssVar.vue +49 -49
- package/samples/Basic/components/div/DivGroup1.vue +32 -32
- package/samples/Basic/components/div/DivGroup2.vue +40 -40
- package/samples/Basic/components/div/DivLayout.vue +11 -11
- package/samples/Basic/components/div/DivRadius.vue +46 -46
- package/samples/Basic/components/text/TextAlign.vue +47 -47
- package/samples/Basic/components/text/TextFontStyle.vue +57 -57
- package/samples/Basic/components/text/TextGroup.vue +31 -31
- package/samples/Basic/components/text/TextOverflow.vue +77 -77
- package/samples/BasicFocusControl/App.vue +124 -124
- package/samples/BasicFocusControl/components/BaseBlock.vue +50 -50
- package/samples/BasicFocusControl/components/MainArea.vue +97 -97
- package/samples/BasicFocusControl/components/MainAreaLeftBlock.vue +20 -20
- package/samples/BasicFocusControl/components/MainAreaRightBlock.vue +29 -29
- package/samples/BasicFocusControl/components/SideBar.vue +72 -72
- package/samples/BasicFocusControl/components/SideBarBlock.vue +29 -29
- package/samples/ClassNameDemo/App.vue +119 -119
- package/samples/ClassNameDemo/components/ContentItem.vue +252 -252
- package/samples/ClassNameDemo/components/LoadingView.vue +43 -43
- package/samples/ClassNameDemo/components/TitleView.vue +24 -24
- package/samples/ClassNameDemo/data.js +24 -24
- package/samples/ColorSpace/App.vue +134 -134
- package/samples/DemoHomepage/App.vue +31 -31
- package/samples/DemoHomepage/components/BodyFrame.vue +81 -81
- package/samples/DemoHomepage/components/Dialog.vue +93 -93
- package/samples/DemoHomepage/components/Item.vue +76 -76
- package/samples/DemoHomepage/components/TabFrame.vue +86 -86
- package/samples/DemoHomepage/router.js +132 -132
- package/samples/DemoHomepage/views/Homepage.vue +186 -186
- package/samples/FlipCard/App.vue +80 -80
- package/samples/FlipCard/FlipCard.vue +123 -123
- package/samples/FlipCard/data.js +12 -12
- package/samples/FlowMultiWidget/App.vue +90 -90
- package/samples/FlowMultiWidget/components/Block.vue +106 -106
- package/samples/FlowMultiWidget/components/FlowPage.vue +59 -59
- package/samples/FlowMultiWidget/components/Item.vue +102 -102
- package/samples/FlowMultiWidget/components/MenuItem.vue +71 -71
- package/samples/FlowMultiWidget/components/MyMenu.vue +89 -89
- package/samples/FlowMultiWidget/data.js +446 -446
- package/samples/HashHistory/App.vue +124 -124
- package/samples/HashHistory/components/HorizontalButtonList.vue +113 -113
- package/samples/HashHistory/components/Item.vue +73 -73
- package/samples/HashHistory/router.js +29 -29
- package/samples/HashHistory/views/BasePage.vue +18 -18
- package/samples/HashHistory/views/MainPage.vue +67 -67
- package/samples/HashHistory/views/SubPage.vue +78 -78
- package/samples/HashHistory/views/SubPageFirst.vue +9 -9
- package/samples/HashHistory/views/SubPageSecond.vue +9 -9
- package/samples/LongImage/App.vue +96 -96
- package/samples/LongImage/Button.vue +153 -153
- package/samples/LongImage/LongImageScroll.vue +126 -126
- package/samples/LongImage/Scroll.vue +15 -15
- package/samples/LongText/App.vue +111 -111
- package/samples/LongText/Button.vue +153 -153
- package/samples/LongText/LongTextScroll.vue +224 -224
- package/samples/LongText/Scroll.vue +15 -15
- package/samples/Preload/App.vue +145 -145
- package/samples/Preload/data.js +22 -22
- package/samples/Preload/preloadItem.vue +21 -21
- package/samples/QrcodeDemo/App.vue +72 -72
- package/samples/SimpleWidgetDemo/App.vue +203 -203
- package/samples/SimpleWidgetDemo/Item.vue +82 -82
- package/samples/SimpleWidgetDemo/components/ContentItem.vue +411 -411
- package/samples/SimpleWidgetDemo/components/MyTab.vue +116 -116
- package/samples/SimpleWidgetDemo/data.js +110 -110
- package/samples/SprayView/App.vue +269 -269
- package/samples/SpriteImage/App.vue +174 -174
- package/samples/SpriteImage/images/egg_break.json +116 -116
- package/samples/TextBox/App.vue +178 -178
- package/samples/TextBox/RenderCenter.vue +108 -108
- package/samples/TextBox/RenderLeft.vue +108 -108
- package/samples/TextBox/RenderOneLine.vue +119 -119
- package/samples/TextBox/RenderRight.vue +106 -106
- package/samples/TextShadowDemo/App.vue +97 -97
- package/samples/TextureSize/App.vue +141 -141
- package/samples/ThrowMoveDemo/AccelerateDemo.vue +117 -117
- package/samples/ThrowMoveDemo/App.vue +113 -113
- package/samples/ThrowMoveDemo/LRParabolicDemo.vue +115 -115
- package/samples/ThrowMoveDemo/TargetDemo.vue +116 -116
- package/samples/ThrowMoveDemo/UDParabolicDemo.vue +121 -121
- package/samples/TransitPage/App.vue +40 -40
- package/samples/VideoDemo/App.vue +137 -137
- package/samples/VideoDemo/components/Button.vue +68 -68
- package/samples/VideoDemo/components/Controllor.vue +195 -195
- package/samples/VideoDemo/components/VideoFrame.vue +152 -152
- package/scripts/common.js +115 -92
- package/scripts/deploy-fast-pack.js +17 -0
- package/scripts/deploy-fast-publish.js +44 -0
- package/scripts/{git-commit-empty.js → deploy-git-commit-empty.js} +21 -21
- package/scripts/{pre-pack.js → deploy-prepare.js} +56 -39
- package/scripts/{install-local-packages.js → jsview-install-local-packages.js} +73 -73
- package/scripts/{post-build.js → jsview-post-build.js} +127 -127
- package/scripts/{post-install.js → jsview-post-install.js} +78 -78
- package/scripts/{run-android.js → jsview-run-android.js} +64 -64
- package/scripts/make-js.sh +181 -181
- package/utils/JsViewEngineWidget/bin/index.js +1 -1
- package/utils/JsViewEngineWidget/bin/package.json +11 -11
- package/utils/JsViewVueTools/JsvHashHistory.js +111 -111
- package/utils/JsViewVueTools/JsvRuntimeBridge.js +417 -417
- package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserPreload.vue +80 -80
- package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserQrcode.vue +147 -147
- package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserSpray.vue +54 -54
- package/utils/JsViewVueWidget/BrowserDebugWidget/JsvApic/ApicDataBase.js +28 -28
- package/utils/JsViewVueWidget/BrowserDebugWidget/JsvApic/BrowserApic.vue +123 -123
- package/utils/JsViewVueWidget/BrowserDebugWidget/JsvApic/GifData.js +83 -83
- package/utils/JsViewVueWidget/BrowserDebugWidget/JsvApic/LoopToolBase.js +25 -25
- package/utils/JsViewVueWidget/BrowserDebugWidget/JsvApic/NormalLoopTool.js +61 -61
- package/utils/JsViewVueWidget/BrowserDebugWidget/JsvApic/PartLoopTool.js +119 -119
- package/utils/JsViewVueWidget/BrowserDebugWidget/JsvApic/Viewer.js +106 -106
- package/utils/JsViewVueWidget/BrowserDebugWidget/JsvApic/WebpData.js +141 -141
- package/utils/JsViewVueWidget/BrowserDebugWidget/WidgetLoader.js +20 -20
- package/utils/JsViewVueWidget/JsvActorMove/ActorControlBase.js +204 -204
- package/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue +63 -63
- package/utils/JsViewVueWidget/JsvActorMove/JsvActorMoveControl.js +426 -426
- package/utils/JsViewVueWidget/JsvActorMove/index.js +12 -12
- package/utils/JsViewVueWidget/JsvApic/JsvApic.vue +178 -178
- package/utils/JsViewVueWidget/JsvApic/index.js +17 -17
- package/utils/JsViewVueWidget/JsvMarquee.vue +196 -196
- package/utils/JsViewVueWidget/JsvNinePatch.vue +76 -76
- package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +350 -350
- package/utils/JsViewVueWidget/JsvPreload/index.js +21 -21
- package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +140 -140
- package/utils/JsViewVueWidget/JsvQrcode/index.js +18 -18
- package/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue +139 -139
- package/utils/JsViewVueWidget/JsvSpray/index.js +14 -14
- package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue +447 -447
- package/utils/JsViewVueWidget/JsvSpriteAnim/SpriteController.js +56 -56
- package/utils/JsViewVueWidget/JsvSpriteAnim/index.js +6 -6
- package/utils/JsViewVueWidget/JsvSwiper/Indicator.vue +34 -34
- package/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue +494 -494
- package/utils/JsViewVueWidget/JsvSwiper/index.js +9 -9
- package/utils/JsViewVueWidget/JsvSwiper3D/Indicator.vue +34 -34
- package/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue +403 -403
- package/utils/JsViewVueWidget/JsvSwiper3D/index.js +9 -9
- package/utils/JsViewVueWidget/JsvTextBox.vue +110 -110
- package/utils/JsViewVueWidget/JsvVideo.vue +35 -35
- package/vetur.config.js +5 -5
- package/.gitmodules +0 -6
- package/README.md +0 -15
- package/doc/IMPORT_CHANGE_LOG.txt +0 -3
- package/doc/about-project-postinstall.md +0 -0
- package/doc/git_commit.md +0 -15
- package/doc/test_version_up.txt +0 -1
- package/scripts/update-version.js +0 -32
- package/shijiu-jsview-vue-0.9.246.tgz +0 -0
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const childProcess = require('child_process');
|
|
4
|
-
const path = require('path');
|
|
5
|
-
|
|
6
|
-
function getOptions() {
|
|
7
|
-
const options = {
|
|
8
|
-
androidPackage: "com.qcode.jsview.sample_demo/com.qcode.jsview.sample.SingleActivity",
|
|
9
|
-
coreRevision: null,
|
|
10
|
-
jseUrl: null,
|
|
11
|
-
homepageUrl: null,
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
if (process.argv.length >= 3) {
|
|
15
|
-
options.androidPackage = process.argv[2];
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const rootDir = process.cwd();
|
|
19
|
-
const jsviewDir = path.resolve(rootDir, 'jsview');
|
|
20
|
-
const jsveiwVersionFile = path.resolve(jsviewDir, 'dom/target_core_revision.js');
|
|
21
|
-
const jsviewTargetVersion = require(jsveiwVersionFile);
|
|
22
|
-
options.coreRevision = jsviewTargetVersion.CoreRevision;
|
|
23
|
-
options.jseUrl = jsviewTargetVersion.JseUrl;
|
|
24
|
-
|
|
25
|
-
const homepageUrlFile = path.resolve(rootDir, 'node_modules/.cache/jsview/network');
|
|
26
|
-
let homepageUrl = require(homepageUrlFile);
|
|
27
|
-
homepageUrl = homepageUrl.replace(/\u001b\[.*?m/g, '')
|
|
28
|
-
options.homepageUrl = homepageUrl + "js/main.jsv.js";
|
|
29
|
-
|
|
30
|
-
return options;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function printRevision(options) {
|
|
34
|
-
console.log("**************************************************");
|
|
35
|
-
console.log("* Android Package: " + options.androidPackage);
|
|
36
|
-
console.log("* Core: " + options.coreRevision);
|
|
37
|
-
console.log("* Engine JS url: " + options.jseUrl);
|
|
38
|
-
console.log("* Homepage url: " + options.homepageUrl);
|
|
39
|
-
console.log("**************************************************");
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function androidStartActivity(options) {
|
|
43
|
-
let cmdline = "adb shell am start";
|
|
44
|
-
cmdline += ` -n ${options.androidPackage}`;
|
|
45
|
-
cmdline += ` --es COREVERSIONRANGE "${options.coreRevision}"`;
|
|
46
|
-
cmdline += ` --es ENGINE "${options.jseUrl}"`;
|
|
47
|
-
cmdline += ` --es URL "${options.homepageUrl}"`;
|
|
48
|
-
console.log(`Run command: ${cmdline}\n`);
|
|
49
|
-
try {
|
|
50
|
-
childProcess.execSync(cmdline, {stdio: [0, 1, 2]});
|
|
51
|
-
} catch (e) {
|
|
52
|
-
// console.log(e);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
function main() {
|
|
58
|
-
const options = getOptions();
|
|
59
|
-
|
|
60
|
-
printRevision(options);
|
|
61
|
-
|
|
62
|
-
androidStartActivity(options);
|
|
63
|
-
}
|
|
64
|
-
main()
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const childProcess = require('child_process');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
6
|
+
function getOptions() {
|
|
7
|
+
const options = {
|
|
8
|
+
androidPackage: "com.qcode.jsview.sample_demo/com.qcode.jsview.sample.SingleActivity",
|
|
9
|
+
coreRevision: null,
|
|
10
|
+
jseUrl: null,
|
|
11
|
+
homepageUrl: null,
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
if (process.argv.length >= 3) {
|
|
15
|
+
options.androidPackage = process.argv[2];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const rootDir = process.cwd();
|
|
19
|
+
const jsviewDir = path.resolve(rootDir, 'jsview');
|
|
20
|
+
const jsveiwVersionFile = path.resolve(jsviewDir, 'dom/target_core_revision.js');
|
|
21
|
+
const jsviewTargetVersion = require(jsveiwVersionFile);
|
|
22
|
+
options.coreRevision = jsviewTargetVersion.CoreRevision;
|
|
23
|
+
options.jseUrl = jsviewTargetVersion.JseUrl;
|
|
24
|
+
|
|
25
|
+
const homepageUrlFile = path.resolve(rootDir, 'node_modules/.cache/jsview/network');
|
|
26
|
+
let homepageUrl = require(homepageUrlFile);
|
|
27
|
+
homepageUrl = homepageUrl.replace(/\u001b\[.*?m/g, '')
|
|
28
|
+
options.homepageUrl = homepageUrl + "js/main.jsv.js";
|
|
29
|
+
|
|
30
|
+
return options;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function printRevision(options) {
|
|
34
|
+
console.log("**************************************************");
|
|
35
|
+
console.log("* Android Package: " + options.androidPackage);
|
|
36
|
+
console.log("* Core: " + options.coreRevision);
|
|
37
|
+
console.log("* Engine JS url: " + options.jseUrl);
|
|
38
|
+
console.log("* Homepage url: " + options.homepageUrl);
|
|
39
|
+
console.log("**************************************************");
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function androidStartActivity(options) {
|
|
43
|
+
let cmdline = "adb shell am start";
|
|
44
|
+
cmdline += ` -n ${options.androidPackage}`;
|
|
45
|
+
cmdline += ` --es COREVERSIONRANGE "${options.coreRevision}"`;
|
|
46
|
+
cmdline += ` --es ENGINE "${options.jseUrl}"`;
|
|
47
|
+
cmdline += ` --es URL "${options.homepageUrl}"`;
|
|
48
|
+
console.log(`Run command: ${cmdline}\n`);
|
|
49
|
+
try {
|
|
50
|
+
childProcess.execSync(cmdline, {stdio: [0, 1, 2]});
|
|
51
|
+
} catch (e) {
|
|
52
|
+
// console.log(e);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
function main() {
|
|
58
|
+
const options = getOptions();
|
|
59
|
+
|
|
60
|
+
printRevision(options);
|
|
61
|
+
|
|
62
|
+
androidStartActivity(options);
|
|
63
|
+
}
|
|
64
|
+
main()
|
package/scripts/make-js.sh
CHANGED
|
@@ -1,181 +1,181 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
set -o errexit
|
|
4
|
-
set -o nounset
|
|
5
|
-
|
|
6
|
-
print_usage()
|
|
7
|
-
{
|
|
8
|
-
echo '
|
|
9
|
-
NAME
|
|
10
|
-
make-js
|
|
11
|
-
|
|
12
|
-
SYNOPSIS
|
|
13
|
-
make-js
|
|
14
|
-
|
|
15
|
-
DESCRIPTION
|
|
16
|
-
build sample_with_button APK. auto setup code revision
|
|
17
|
-
Example: ./make-js
|
|
18
|
-
|
|
19
|
-
OPTIONS
|
|
20
|
-
--certpath=Path(from folder react_js) of certification, such as src/appConfig = react_js/src/appConfig/
|
|
21
|
-
default value is src/appConfig
|
|
22
|
-
-h, --help
|
|
23
|
-
Optional. Print help infomation and exit successfully.;
|
|
24
|
-
';
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
parse_options()
|
|
28
|
-
{
|
|
29
|
-
cmd_getopt="getopt";
|
|
30
|
-
if [ "$KERNEL_NAME" == "Darwin" ]; then
|
|
31
|
-
cmd_getopt="/usr/local/Cellar/gnu-getopt/2.37.2/bin/getopt";
|
|
32
|
-
fi
|
|
33
|
-
|
|
34
|
-
options=`$cmd_getopt -o h \
|
|
35
|
-
--long "certpath:,help" \
|
|
36
|
-
-n 'make-js' -- "$@"`;
|
|
37
|
-
eval set -- "$options"
|
|
38
|
-
while true; do
|
|
39
|
-
case "$1" in
|
|
40
|
-
(-h | --help)
|
|
41
|
-
print_usage;
|
|
42
|
-
exit 0;
|
|
43
|
-
;;
|
|
44
|
-
(--certpath)
|
|
45
|
-
CERT_PATH=$2;
|
|
46
|
-
shift 2;
|
|
47
|
-
;;
|
|
48
|
-
(- | --)
|
|
49
|
-
shift;
|
|
50
|
-
break;
|
|
51
|
-
;;
|
|
52
|
-
(*)
|
|
53
|
-
echo "Internal error!";
|
|
54
|
-
exit 1;
|
|
55
|
-
;;
|
|
56
|
-
esac
|
|
57
|
-
done
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
logdbg()
|
|
61
|
-
{
|
|
62
|
-
if [[ $DEBUG_VERBOSE == false ]]; then
|
|
63
|
-
return;
|
|
64
|
-
fi
|
|
65
|
-
|
|
66
|
-
echo -e " [d]: $@";
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
logtrace()
|
|
70
|
-
{
|
|
71
|
-
echo -e "\033[1;34m [-]: $@ \033[00m";
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
loginfo()
|
|
75
|
-
{
|
|
76
|
-
echo -e "\033[1;32m [+]: $@ \033[00m";
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
logwarn()
|
|
80
|
-
{
|
|
81
|
-
echo -e "\033[1;33m [!]: $@ \033[00m";
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
logerr_and_exit()
|
|
85
|
-
{
|
|
86
|
-
echo -e "\033[1;31m [x]: $@ \033[00m";
|
|
87
|
-
exit 1;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
trim() {
|
|
91
|
-
local var="$*"
|
|
92
|
-
var="${var#"${var%%[![:space:]]*}"}" # remove leading whitespace characters
|
|
93
|
-
var="${var%"${var##*[![:space:]]}"}" # remove trailing whitespace characters
|
|
94
|
-
echo -n "$var"
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
print_version_log()
|
|
98
|
-
{
|
|
99
|
-
logtrace "*********************************************************";
|
|
100
|
-
logtrace " Version infomation";
|
|
101
|
-
logtrace " codeRevision : ${CODE_REVISION}";
|
|
102
|
-
logtrace "*********************************************************";
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
prepare_env()
|
|
106
|
-
{
|
|
107
|
-
CODE_REVISION="$(git rev-list --count HEAD)";
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
# common variable
|
|
111
|
-
SCRIPT_DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd);
|
|
112
|
-
PROJECT_DIR=$(dirname "$SCRIPT_DIR");
|
|
113
|
-
PROJECT_DIR=$(dirname "$PROJECT_DIR");
|
|
114
|
-
KERNEL_NAME=$(uname -s);
|
|
115
|
-
DEBUG_VERBOSE=false;
|
|
116
|
-
CERT_PATH=src/appConfig
|
|
117
|
-
|
|
118
|
-
# specific variable
|
|
119
|
-
CODE_REVISION=0;
|
|
120
|
-
|
|
121
|
-
main_run()
|
|
122
|
-
{
|
|
123
|
-
loginfo "parsing options";
|
|
124
|
-
parse_options $@;
|
|
125
|
-
|
|
126
|
-
loginfo "prepare env";
|
|
127
|
-
prepare_env;
|
|
128
|
-
|
|
129
|
-
print_version_log;
|
|
130
|
-
|
|
131
|
-
# TODO: cd 到vue工程代码的根目录(有node_modules的那个目录)
|
|
132
|
-
# cd react_js;
|
|
133
|
-
|
|
134
|
-
# 更新环境状态
|
|
135
|
-
#if [ -f "package-lock.json-perfect" ]; then
|
|
136
|
-
#loginfo "USE package-lock.json-perfect"
|
|
137
|
-
#cp package-lock.json-perfect package-lock.json
|
|
138
|
-
#fi
|
|
139
|
-
npm ci
|
|
140
|
-
#cd jsview/
|
|
141
|
-
#node scripts/do-patch.js
|
|
142
|
-
#cd ../
|
|
143
|
-
|
|
144
|
-
loginfo "CERT_PATH=${CERT_PATH}"
|
|
145
|
-
|
|
146
|
-
# 替换App为DemoHomepage
|
|
147
|
-
SED_CMD='sed -i ';
|
|
148
|
-
if [ "$KERNEL_NAME" == "Darwin" ]; then
|
|
149
|
-
SED_CMD+=' ""';
|
|
150
|
-
fi
|
|
151
|
-
$SED_CMD 's|@/App.vue|jsview/samples/DemoHomepage/App.vue|' src/main.ts;
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
# 生成crt和pem签名文件
|
|
155
|
-
cp ${CERT_PATH}/app_sign_private_key_sample.crt src/appConfig/app_sign_private_key.crt
|
|
156
|
-
cp ${CERT_PATH}/app_sign_public_key_sample.pem src/appConfig/app_sign_public_key.pem
|
|
157
|
-
|
|
158
|
-
# 编译JS
|
|
159
|
-
npm run-script build
|
|
160
|
-
|
|
161
|
-
# 输出主文件路径
|
|
162
|
-
local main_path=`find dist | grep "main\..*\.js$"`
|
|
163
|
-
echo "MAIN JS SUB_PATH: ${main_path}"
|
|
164
|
-
|
|
165
|
-
# 输出 Core 版本信息
|
|
166
|
-
local core_revision=`cat jsview/dom/target_core_revision.js | grep "CoreRevision"`
|
|
167
|
-
core_revision=${core_revision#*\"CoreRevision\":}; # 去掉开头
|
|
168
|
-
core_revision=${core_revision%,*}; # 去掉末尾的引号
|
|
169
|
-
echo "CORE REVISION: ${core_revision}"
|
|
170
|
-
|
|
171
|
-
# 输出 engineJs 信息
|
|
172
|
-
local engine_js=`cat jsview/dom/target_core_revision.js | grep "JsViewES6"`
|
|
173
|
-
engine_js=${engine_js#*\"}; # 去掉开头的引号
|
|
174
|
-
engine_js=${engine_js%\",*}; # 去掉末尾的引号
|
|
175
|
-
echo "ENGINE JS: ${engine_js}"
|
|
176
|
-
|
|
177
|
-
loginfo "DONE !!!";
|
|
178
|
-
loginfo "BUILD SUCCESSED";
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
main_run $@;
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -o errexit
|
|
4
|
+
set -o nounset
|
|
5
|
+
|
|
6
|
+
print_usage()
|
|
7
|
+
{
|
|
8
|
+
echo '
|
|
9
|
+
NAME
|
|
10
|
+
make-js
|
|
11
|
+
|
|
12
|
+
SYNOPSIS
|
|
13
|
+
make-js
|
|
14
|
+
|
|
15
|
+
DESCRIPTION
|
|
16
|
+
build sample_with_button APK. auto setup code revision
|
|
17
|
+
Example: ./make-js
|
|
18
|
+
|
|
19
|
+
OPTIONS
|
|
20
|
+
--certpath=Path(from folder react_js) of certification, such as src/appConfig = react_js/src/appConfig/
|
|
21
|
+
default value is src/appConfig
|
|
22
|
+
-h, --help
|
|
23
|
+
Optional. Print help infomation and exit successfully.;
|
|
24
|
+
';
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
parse_options()
|
|
28
|
+
{
|
|
29
|
+
cmd_getopt="getopt";
|
|
30
|
+
if [ "$KERNEL_NAME" == "Darwin" ]; then
|
|
31
|
+
cmd_getopt="/usr/local/Cellar/gnu-getopt/2.37.2/bin/getopt";
|
|
32
|
+
fi
|
|
33
|
+
|
|
34
|
+
options=`$cmd_getopt -o h \
|
|
35
|
+
--long "certpath:,help" \
|
|
36
|
+
-n 'make-js' -- "$@"`;
|
|
37
|
+
eval set -- "$options"
|
|
38
|
+
while true; do
|
|
39
|
+
case "$1" in
|
|
40
|
+
(-h | --help)
|
|
41
|
+
print_usage;
|
|
42
|
+
exit 0;
|
|
43
|
+
;;
|
|
44
|
+
(--certpath)
|
|
45
|
+
CERT_PATH=$2;
|
|
46
|
+
shift 2;
|
|
47
|
+
;;
|
|
48
|
+
(- | --)
|
|
49
|
+
shift;
|
|
50
|
+
break;
|
|
51
|
+
;;
|
|
52
|
+
(*)
|
|
53
|
+
echo "Internal error!";
|
|
54
|
+
exit 1;
|
|
55
|
+
;;
|
|
56
|
+
esac
|
|
57
|
+
done
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
logdbg()
|
|
61
|
+
{
|
|
62
|
+
if [[ $DEBUG_VERBOSE == false ]]; then
|
|
63
|
+
return;
|
|
64
|
+
fi
|
|
65
|
+
|
|
66
|
+
echo -e " [d]: $@";
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
logtrace()
|
|
70
|
+
{
|
|
71
|
+
echo -e "\033[1;34m [-]: $@ \033[00m";
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
loginfo()
|
|
75
|
+
{
|
|
76
|
+
echo -e "\033[1;32m [+]: $@ \033[00m";
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
logwarn()
|
|
80
|
+
{
|
|
81
|
+
echo -e "\033[1;33m [!]: $@ \033[00m";
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
logerr_and_exit()
|
|
85
|
+
{
|
|
86
|
+
echo -e "\033[1;31m [x]: $@ \033[00m";
|
|
87
|
+
exit 1;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
trim() {
|
|
91
|
+
local var="$*"
|
|
92
|
+
var="${var#"${var%%[![:space:]]*}"}" # remove leading whitespace characters
|
|
93
|
+
var="${var%"${var##*[![:space:]]}"}" # remove trailing whitespace characters
|
|
94
|
+
echo -n "$var"
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
print_version_log()
|
|
98
|
+
{
|
|
99
|
+
logtrace "*********************************************************";
|
|
100
|
+
logtrace " Version infomation";
|
|
101
|
+
logtrace " codeRevision : ${CODE_REVISION}";
|
|
102
|
+
logtrace "*********************************************************";
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
prepare_env()
|
|
106
|
+
{
|
|
107
|
+
CODE_REVISION="$(git rev-list --count HEAD)";
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
# common variable
|
|
111
|
+
SCRIPT_DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd);
|
|
112
|
+
PROJECT_DIR=$(dirname "$SCRIPT_DIR");
|
|
113
|
+
PROJECT_DIR=$(dirname "$PROJECT_DIR");
|
|
114
|
+
KERNEL_NAME=$(uname -s);
|
|
115
|
+
DEBUG_VERBOSE=false;
|
|
116
|
+
CERT_PATH=src/appConfig
|
|
117
|
+
|
|
118
|
+
# specific variable
|
|
119
|
+
CODE_REVISION=0;
|
|
120
|
+
|
|
121
|
+
main_run()
|
|
122
|
+
{
|
|
123
|
+
loginfo "parsing options";
|
|
124
|
+
parse_options $@;
|
|
125
|
+
|
|
126
|
+
loginfo "prepare env";
|
|
127
|
+
prepare_env;
|
|
128
|
+
|
|
129
|
+
print_version_log;
|
|
130
|
+
|
|
131
|
+
# TODO: cd 到vue工程代码的根目录(有node_modules的那个目录)
|
|
132
|
+
# cd react_js;
|
|
133
|
+
|
|
134
|
+
# 更新环境状态
|
|
135
|
+
#if [ -f "package-lock.json-perfect" ]; then
|
|
136
|
+
#loginfo "USE package-lock.json-perfect"
|
|
137
|
+
#cp package-lock.json-perfect package-lock.json
|
|
138
|
+
#fi
|
|
139
|
+
npm ci
|
|
140
|
+
#cd jsview/
|
|
141
|
+
#node scripts/do-patch.js
|
|
142
|
+
#cd ../
|
|
143
|
+
|
|
144
|
+
loginfo "CERT_PATH=${CERT_PATH}"
|
|
145
|
+
|
|
146
|
+
# 替换App为DemoHomepage
|
|
147
|
+
SED_CMD='sed -i ';
|
|
148
|
+
if [ "$KERNEL_NAME" == "Darwin" ]; then
|
|
149
|
+
SED_CMD+=' ""';
|
|
150
|
+
fi
|
|
151
|
+
$SED_CMD 's|@/App.vue|jsview/samples/DemoHomepage/App.vue|' src/main.ts;
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
# 生成crt和pem签名文件
|
|
155
|
+
cp ${CERT_PATH}/app_sign_private_key_sample.crt src/appConfig/app_sign_private_key.crt
|
|
156
|
+
cp ${CERT_PATH}/app_sign_public_key_sample.pem src/appConfig/app_sign_public_key.pem
|
|
157
|
+
|
|
158
|
+
# 编译JS
|
|
159
|
+
npm run-script build
|
|
160
|
+
|
|
161
|
+
# 输出主文件路径
|
|
162
|
+
local main_path=`find dist | grep "main\..*\.js$"`
|
|
163
|
+
echo "MAIN JS SUB_PATH: ${main_path}"
|
|
164
|
+
|
|
165
|
+
# 输出 Core 版本信息
|
|
166
|
+
local core_revision=`cat jsview/dom/target_core_revision.js | grep "CoreRevision"`
|
|
167
|
+
core_revision=${core_revision#*\"CoreRevision\":}; # 去掉开头
|
|
168
|
+
core_revision=${core_revision%,*}; # 去掉末尾的引号
|
|
169
|
+
echo "CORE REVISION: ${core_revision}"
|
|
170
|
+
|
|
171
|
+
# 输出 engineJs 信息
|
|
172
|
+
local engine_js=`cat jsview/dom/target_core_revision.js | grep "JsViewES6"`
|
|
173
|
+
engine_js=${engine_js#*\"}; # 去掉开头的引号
|
|
174
|
+
engine_js=${engine_js%\",*}; # 去掉末尾的引号
|
|
175
|
+
echo "ENGINE JS: ${engine_js}"
|
|
176
|
+
|
|
177
|
+
loginfo "DONE !!!";
|
|
178
|
+
loginfo "BUILD SUCCESSED";
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
main_run $@;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./jsview-vue-widget.min.js"
|
|
1
|
+
export * from "./jsview-vue-widget.min.js"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@shijiu-jsview/vue-widget",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "A Vue widget library used to get jsview support",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"keywords": [
|
|
7
|
-
"jsview-vue",
|
|
8
|
-
"widget"
|
|
9
|
-
],
|
|
10
|
-
"author": "Donglin.lu <donglin.lu@qcast.cn>"
|
|
11
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@shijiu-jsview/vue-widget",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A Vue widget library used to get jsview support",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"jsview-vue",
|
|
8
|
+
"widget"
|
|
9
|
+
],
|
|
10
|
+
"author": "Donglin.lu <donglin.lu@qcast.cn>"
|
|
11
|
+
}
|