@shijiu/jsview-vue 0.9.0 → 0.9.247
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/README.md +8 -2
- package/package.json +6 -6
- package/scripts/common.js +1 -0
- package/scripts/deploy-fast-pack.js +19 -0
- package/scripts/deploy-fast-publish.js +19 -0
- package/scripts/{git-commit-empty.js → deploy-git-commit-empty.js} +0 -0
- package/scripts/{pre-pack.js → deploy-prepare.js} +39 -3
- package/scripts/{install-local-packages.js → jsview-install-local-packages.js} +0 -0
- package/scripts/{post-build.js → jsview-post-build.js} +0 -0
- package/scripts/{post-install.js → jsview-post-install.js} +0 -0
- package/scripts/{run-android.js → jsview-run-android.js} +0 -0
- package/.gitmodules +0 -6
- 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
package/README.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
jsview-vue和jsview-vue/test是两个完全独立的工程。
|
|
2
|
+
|
|
3
|
+
jsview-vue用于开发和部署@shijiu/jsview-vue module,不需要做npm install。
|
|
4
|
+
|
|
5
|
+
jsview-vue/test用于调试jsview-vue,需要在npm start之前运行npm ci安装依赖包,参照jsview-vue/test/README.md。
|
|
6
|
+
|
|
1
7
|
1. 更新git submodule:
|
|
2
8
|
|
|
3
9
|
``` git submodule update --init --recursive ```
|
|
@@ -8,8 +14,8 @@
|
|
|
8
14
|
|
|
9
15
|
3. 发布:
|
|
10
16
|
|
|
11
|
-
``` npm
|
|
17
|
+
``` npm deploy ```
|
|
12
18
|
|
|
13
19
|
4. 注意事项:
|
|
14
20
|
|
|
15
|
-
生效时间和是否可以强制制定版本
|
|
21
|
+
TODO: 生效时间和是否可以强制制定版本
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shijiu/jsview-vue",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.247",
|
|
4
4
|
"bin": {
|
|
5
|
-
"jsview-post-build": "./scripts/post-build.js",
|
|
6
|
-
"jsview-post-install": "./scripts/post-install.js",
|
|
7
|
-
"jsview-install-local-packages": "./scripts/install-local-packages.js"
|
|
5
|
+
"jsview-post-build": "./scripts/jsview-post-build.js",
|
|
6
|
+
"jsview-post-install": "./scripts/jsview-post-install.js",
|
|
7
|
+
"jsview-install-local-packages": "./scripts/jsview-install-local-packages.js"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
|
-
"
|
|
11
|
-
"
|
|
10
|
+
"fast-publish": "node ./scripts/deploy-update-version.js && npm publish --access=public --registry https://registry.npmjs.com",
|
|
11
|
+
"fast-pack": "node ./scripts/deploy-update-version.js && node ./scripts/deploy-pre-pack.js"
|
|
12
12
|
},
|
|
13
13
|
"repository": "system/jsview-vue",
|
|
14
14
|
"bugs": "http://gitlab.qcast.cn/system/jsview-vue/issues",
|
package/scripts/common.js
CHANGED
|
@@ -24,6 +24,7 @@ function updateVersion(projectDir, ignoreChanges)
|
|
|
24
24
|
if (!ignoreChanges) {
|
|
25
25
|
let cmdLine = 'cd ' + projectDir + ' && git status --porcelain';
|
|
26
26
|
let gitChanges = execSync(cmdLine, { stderr: "inherit" });
|
|
27
|
+
gitChanges = gitChanges.toString();
|
|
27
28
|
if (gitChanges) {
|
|
28
29
|
return gitChanges;
|
|
29
30
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { execSync } = require('child_process');
|
|
4
|
+
|
|
5
|
+
function main() {
|
|
6
|
+
console.log(process.argv)
|
|
7
|
+
|
|
8
|
+
const options = {};
|
|
9
|
+
options.projectDir = process.cwd();
|
|
10
|
+
|
|
11
|
+
let cmdLine = 'cd ' + options.projectDir + '&& node ./scripts/deploy-prepare.js';
|
|
12
|
+
console.info('Run [' + cmdLine + ']... ');
|
|
13
|
+
execSync(cmdLine, { stdio: 'inherit', stderr: 'inherit' });
|
|
14
|
+
|
|
15
|
+
cmdLine = 'cd ' + options.projectDir + '&& npm pack';
|
|
16
|
+
console.info('Run [' + cmdLine + ']... ');
|
|
17
|
+
execSync(cmdLine, { stdio: 'inherit', stderr: 'inherit' });
|
|
18
|
+
}
|
|
19
|
+
main();
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { execSync } = require('child_process');
|
|
4
|
+
|
|
5
|
+
function main() {
|
|
6
|
+
console.log(process.argv)
|
|
7
|
+
|
|
8
|
+
const options = {};
|
|
9
|
+
options.projectDir = process.cwd();
|
|
10
|
+
|
|
11
|
+
let cmdLine = 'cd ' + options.projectDir + '&& node ./scripts/deploy-prepare.js';
|
|
12
|
+
console.info('Run [' + cmdLine + ']... ');
|
|
13
|
+
execSync(cmdLine, { stdio: 'inherit', stderr: 'inherit' });
|
|
14
|
+
|
|
15
|
+
cmdLine = 'cd ' + options.projectDir + '&& npm publish --access=public --registry https://registry.npmjs.com';
|
|
16
|
+
console.info('Run [' + cmdLine + ']... ');
|
|
17
|
+
execSync(cmdLine, { stdio: 'inherit', stderr: 'inherit' });
|
|
18
|
+
}
|
|
19
|
+
main();
|
|
File without changes
|
|
@@ -2,8 +2,42 @@
|
|
|
2
2
|
|
|
3
3
|
const fs = require('fs');
|
|
4
4
|
const path = require('path');
|
|
5
|
+
const readline = require('readline')
|
|
5
6
|
const { execSync } = require('child_process');
|
|
6
|
-
const { cpSync } = require('./common');
|
|
7
|
+
const { cpSync, updateVersion } = require('./common');
|
|
8
|
+
|
|
9
|
+
async function updateVersionWithPrompt() {
|
|
10
|
+
const options = {};
|
|
11
|
+
options.projectDir = process.cwd();
|
|
12
|
+
|
|
13
|
+
const gitChanges = updateVersion(options.projectDir);
|
|
14
|
+
if (gitChanges) {
|
|
15
|
+
console.log('Git changes:\n' + gitChanges);
|
|
16
|
+
|
|
17
|
+
const input = readline.createInterface({
|
|
18
|
+
input: process.stdin,
|
|
19
|
+
output: process.stdout
|
|
20
|
+
});
|
|
21
|
+
input.on('SIGINT', function () {
|
|
22
|
+
console.error("Error: User cancelled.")
|
|
23
|
+
process.exit(1);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
input.question('Warning: Git working directory not clean, do you want to update version continue? [yes/NO]\n',
|
|
27
|
+
answer => {
|
|
28
|
+
input.close();
|
|
29
|
+
if (answer.toLowerCase() === 'yes') {
|
|
30
|
+
updateVersion(options.projectDir, true);
|
|
31
|
+
} else {
|
|
32
|
+
console.error("Error: User cancelled.")
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
for await (const line of input) {
|
|
37
|
+
return 0;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
7
41
|
|
|
8
42
|
function buildAndInstallModules(moduleName, projectDir, sourceDir, distBinDir) {
|
|
9
43
|
console.info('\nBuilding ' + moduleName + '... ');
|
|
@@ -14,13 +48,13 @@ function buildAndInstallModules(moduleName, projectDir, sourceDir, distBinDir) {
|
|
|
14
48
|
}
|
|
15
49
|
|
|
16
50
|
cmdLine = 'cd ' + sourceDir + ' && npm install && npm run build';
|
|
17
|
-
console.info('
|
|
51
|
+
console.info('Run [' + cmdLine + ']... ');
|
|
18
52
|
execSync(cmdLine, { stdio: 'inherit', stderr: 'inherit' });
|
|
19
53
|
|
|
20
54
|
cpSync(projectDir, path.resolve(sourceDir, 'dist'), distBinDir);
|
|
21
55
|
}
|
|
22
56
|
|
|
23
|
-
function main() {
|
|
57
|
+
async function main() {
|
|
24
58
|
const options = {};
|
|
25
59
|
options.projectDir = process.cwd();
|
|
26
60
|
options.domBinDir = path.resolve(options.projectDir, 'dom/bin');
|
|
@@ -28,6 +62,8 @@ function main() {
|
|
|
28
62
|
options.domSourceDir = path.resolve(options.projectDir, 'deps/jsview-dom');
|
|
29
63
|
options.widgetSourceDir = path.resolve(options.projectDir, 'deps/jsview-vue3-engine-widget');
|
|
30
64
|
|
|
65
|
+
const ret = await updateVersionWithPrompt();
|
|
66
|
+
|
|
31
67
|
buildAndInstallModules('jsview-dom',
|
|
32
68
|
options.projectDir,
|
|
33
69
|
options.domSourceDir, options.domBinDir);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/.gitmodules
DELETED
|
File without changes
|
package/doc/git_commit.md
DELETED
package/doc/test_version_up.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
+8332
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const readline = require('readline')
|
|
4
|
-
const { updateVersion } = require('./common');
|
|
5
|
-
|
|
6
|
-
function main() {
|
|
7
|
-
const options = {};
|
|
8
|
-
options.projectDir = process.cwd();
|
|
9
|
-
|
|
10
|
-
const gitChanges = updateVersion(options.projectDir);
|
|
11
|
-
if (gitChanges) {
|
|
12
|
-
const input = readline.createInterface({
|
|
13
|
-
input: process.stdin,
|
|
14
|
-
output: process.stdout
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
console.log('Git changes:\n' + gitChanges);
|
|
18
|
-
|
|
19
|
-
input.question('Warning: Git working directory not clean, do you want to update version continue? [yes/NO]\n',
|
|
20
|
-
answer => {
|
|
21
|
-
input.close();
|
|
22
|
-
if (answer.toLowerCase() === 'yes') {
|
|
23
|
-
updateVersion(options.projectDir, true);
|
|
24
|
-
} else {
|
|
25
|
-
console.error("Error: User cancelled.")
|
|
26
|
-
process.exit(1);
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
main();
|
|
Binary file
|