ztxkutils 2.10.66-13 → 2.10.66-14
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/package.json +17 -16
- package/zti18n-cli/index.js +1 -1
- package/zti18n-cli/src/command/initFileConf.js +3 -3
- package/zti18n-cli/src/index.js +5 -5
- package/zti18n-cli/src/utils/mergeOptions.js +2 -2
- package/zti18n-cli/src/utils/reactOptions.js +0 -1
- package/zti18n-cli/src/utils/vueOptions.js +0 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "ztxkutils",
|
3
|
-
"version": "2.10.66-
|
3
|
+
"version": "2.10.66-14",
|
4
4
|
"description": "",
|
5
5
|
"main": "./dist/index.js",
|
6
6
|
"module": "./dist/index.js",
|
@@ -52,17 +52,6 @@
|
|
52
52
|
"ztxkui": "^0.4.1"
|
53
53
|
},
|
54
54
|
"dependencies": {
|
55
|
-
"crypto-js": "^4.1.1",
|
56
|
-
"decimal.js-light": "^2.5.1",
|
57
|
-
"dexie": "^3.2.3",
|
58
|
-
"i18next": "^23.16.4",
|
59
|
-
"js-base64": "^3.6.0",
|
60
|
-
"jwt-decode": "^3.1.2",
|
61
|
-
"screenfull": "^5.1.0",
|
62
|
-
"sockjs-client": "^1.5.1",
|
63
|
-
"stompjs": "^2.3.3",
|
64
|
-
"zt-sockjs-client": "^0.0.2",
|
65
|
-
"zt-stompjs": "^1.1.2",
|
66
55
|
"@babel/core": "^7.18.10",
|
67
56
|
"@babel/generator": "^7.18.0",
|
68
57
|
"@babel/plugin-proposal-optional-chaining": "^7.18.9",
|
@@ -82,17 +71,29 @@
|
|
82
71
|
"@prettier/plugin-pug": "^1.8.1",
|
83
72
|
"@typescript-eslint/typescript-estree": "^3.8.0",
|
84
73
|
"@vitalets/google-translate-api": "^8.0.0",
|
74
|
+
"babel-template": "^6.26.0",
|
85
75
|
"chalk": "^3.0.0",
|
76
|
+
"commander": "^2.18.0",
|
77
|
+
"crypto-js": "^4.1.1",
|
78
|
+
"decimal.js-light": "^2.5.1",
|
79
|
+
"dexie": "^3.2.3",
|
80
|
+
"di18n-core": "^0.1.29",
|
86
81
|
"glob": "^7.1.6",
|
82
|
+
"i18next": "^23.16.4",
|
83
|
+
"inquirer": "^6.2.2",
|
84
|
+
"js-base64": "^3.6.0",
|
85
|
+
"jwt-decode": "^3.1.2",
|
87
86
|
"mustache": "^4.0.1",
|
88
87
|
"parse5": "^5.1.1",
|
89
88
|
"pug-lexer": "^4.1.0",
|
90
89
|
"pug-parser": "^5.0.1",
|
91
90
|
"pug-source-gen": "0.0.2",
|
92
|
-
"
|
93
|
-
"
|
94
|
-
"
|
95
|
-
"
|
91
|
+
"screenfull": "^5.1.0",
|
92
|
+
"sockjs-client": "^1.5.1",
|
93
|
+
"stompjs": "^2.3.3",
|
94
|
+
"vue-template-compiler": "^2.7.16",
|
95
|
+
"zt-sockjs-client": "^0.0.2",
|
96
|
+
"zt-stompjs": "^1.1.2"
|
96
97
|
},
|
97
98
|
"peerDependencies": {
|
98
99
|
"axios": ">=0.21.1",
|
package/zti18n-cli/index.js
CHANGED
@@ -18,7 +18,7 @@ async function doInquire() {
|
|
18
18
|
// 1. whether overwrite?
|
19
19
|
let configExist = true;
|
20
20
|
try {
|
21
|
-
fs.accessSync('./
|
21
|
+
fs.accessSync('./zti18n.config.js');
|
22
22
|
} catch (e) {
|
23
23
|
configExist = false;
|
24
24
|
}
|
@@ -28,7 +28,7 @@ async function doInquire() {
|
|
28
28
|
{
|
29
29
|
name: 'overwrite',
|
30
30
|
type: 'confirm',
|
31
|
-
message: '配置文件
|
31
|
+
message: '配置文件 zti18n.config.js 已存在,是否覆盖?',
|
32
32
|
},
|
33
33
|
]);
|
34
34
|
|
@@ -67,7 +67,7 @@ module.exports = async function initFileConf(isVue) {
|
|
67
67
|
|
68
68
|
// 配置信息写入文件
|
69
69
|
fs.writeFileSync(
|
70
|
-
'./
|
70
|
+
'./zti18n.config.js',
|
71
71
|
prettier.format('module.exports = ' + JSON.stringify(options), {
|
72
72
|
parser: 'babel',
|
73
73
|
singleQuote: true,
|
package/zti18n-cli/src/index.js
CHANGED
@@ -26,9 +26,9 @@ program
|
|
26
26
|
console.log(' Examples:');
|
27
27
|
console.log();
|
28
28
|
console.log(' sync without publish:');
|
29
|
-
console.log(' $
|
29
|
+
console.log(' $ zti18n sync -c ./config/prod.config.js');
|
30
30
|
console.log(' sync and then publish:');
|
31
|
-
console.log(' $
|
31
|
+
console.log(' $ zti18n sync -p -c ./config/prod.config.js');
|
32
32
|
console.log();
|
33
33
|
});
|
34
34
|
|
@@ -41,7 +41,7 @@ program
|
|
41
41
|
.on('--help', function () {
|
42
42
|
console.log(' Examples:');
|
43
43
|
console.log();
|
44
|
-
console.log(' $
|
44
|
+
console.log(' $ zti18n publish');
|
45
45
|
console.log();
|
46
46
|
});
|
47
47
|
|
@@ -56,7 +56,7 @@ program
|
|
56
56
|
.on('--help', function () {
|
57
57
|
console.log(' Examples:');
|
58
58
|
console.log();
|
59
|
-
console.log(' $
|
59
|
+
console.log(' $ zti18n convert -c ./config/prod.config.js');
|
60
60
|
console.log();
|
61
61
|
});
|
62
62
|
|
@@ -70,6 +70,6 @@ program
|
|
70
70
|
.on('--help', function () {
|
71
71
|
console.log(' Examples:');
|
72
72
|
console.log();
|
73
|
-
console.log(' $
|
73
|
+
console.log(' $ zti18n convert2 -c ./config/prod.config.js');
|
74
74
|
console.log();
|
75
75
|
});
|
@@ -7,11 +7,11 @@ const cwdPath = process.cwd();
|
|
7
7
|
|
8
8
|
module.exports = function mergeOptions(programOption, programParameter) {
|
9
9
|
const options = defaultOptions;
|
10
|
-
const configFileName = programOption.config || '
|
10
|
+
const configFileName = programOption.config || 'zti18n.config.js';
|
11
11
|
|
12
12
|
const configFilePath = path.join(cwdPath, configFileName);
|
13
13
|
|
14
|
-
// 读取
|
14
|
+
// 读取 zti18n-ast.config.js 中设置的参数,然后并入 options
|
15
15
|
if (fs.existsSync(configFilePath)) {
|
16
16
|
let configurationFile = {};
|
17
17
|
try {
|