pug-site-core 3.0.22 → 3.0.24
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/lib/generate.js +5 -1
- package/lib/translate.js +3 -2
- package/package.json +2 -2
package/lib/generate.js
CHANGED
|
@@ -214,7 +214,11 @@ export async function fetchDataToJsonFile(args) {
|
|
|
214
214
|
|
|
215
215
|
let saveJsonData = async (filePath, data) => {
|
|
216
216
|
let finalPath = paths.resolveRoot("jsonData", filePath);
|
|
217
|
-
await fse.remove(finalPath);
|
|
217
|
+
// await fse.remove(finalPath);
|
|
218
|
+
// 如果 路径存在,跳过写入
|
|
219
|
+
if (await fse.pathExists(finalPath)) {
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
218
222
|
await fse.outputJson(finalPath, data);
|
|
219
223
|
};
|
|
220
224
|
|
package/lib/translate.js
CHANGED
|
@@ -66,7 +66,8 @@ const allLang = [
|
|
|
66
66
|
"sv",
|
|
67
67
|
"fi",
|
|
68
68
|
"ms",
|
|
69
|
-
"in"
|
|
69
|
+
"in",
|
|
70
|
+
"ro"
|
|
70
71
|
];
|
|
71
72
|
|
|
72
73
|
let targetLangList = useAllLang
|
|
@@ -87,7 +88,7 @@ const countryLanguageMap = {
|
|
|
87
88
|
tw: "zh-TW",
|
|
88
89
|
gb: "en",
|
|
89
90
|
br: "pt",
|
|
90
|
-
in: "hi"
|
|
91
|
+
in: "hi",
|
|
91
92
|
};
|
|
92
93
|
|
|
93
94
|
async function translateStr(str, targetLanguage) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pug-site-core",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.24",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"ws": "^8.18.0"
|
|
53
53
|
},
|
|
54
54
|
"license": "ISC",
|
|
55
|
-
"description": "
|
|
55
|
+
"description": "getData不删旧数据,增量写文件",
|
|
56
56
|
"files": [
|
|
57
57
|
"lib/",
|
|
58
58
|
"index.js"
|