pug-site-core 1.0.2 → 1.0.3
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/index.js +3 -1
- package/lib/translate.js +1 -3
- package/package.json +3 -5
package/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { startDevServer } from "./lib/devServer.js";
|
|
2
|
+
import { translateLanguageData } from "./lib/translate.js";
|
|
2
3
|
import {
|
|
3
4
|
generateGetDataFn,
|
|
4
5
|
compilePagesPugToFn,
|
|
@@ -13,5 +14,6 @@ export const pugSiteCore = {
|
|
|
13
14
|
compilePagesPugToFn,
|
|
14
15
|
fetchDataToJsonFile,
|
|
15
16
|
buildFn,
|
|
16
|
-
buildStatic
|
|
17
|
+
buildStatic,
|
|
18
|
+
translateLanguageData
|
|
17
19
|
};
|
package/lib/translate.js
CHANGED
|
@@ -55,7 +55,7 @@ async function translateStr(str, targetLanguage) {
|
|
|
55
55
|
return result;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
async function
|
|
58
|
+
export async function translateLanguageData() {
|
|
59
59
|
let orginData = languageData[orginLang];
|
|
60
60
|
console.log("开始翻译");
|
|
61
61
|
let startTime = Date.now();
|
|
@@ -104,5 +104,3 @@ async function main() {
|
|
|
104
104
|
);
|
|
105
105
|
console.log("翻译完成花费:", (Date.now() - startTime) / 1000 + "s");
|
|
106
106
|
}
|
|
107
|
-
|
|
108
|
-
main();
|
package/package.json
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pug-site-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
-
},
|
|
6
|
+
"scripts": {},
|
|
9
7
|
"keywords": [],
|
|
10
8
|
"author": "xy",
|
|
11
9
|
"dependencies": {
|
|
@@ -30,7 +28,7 @@
|
|
|
30
28
|
"ws": "^8.18.0"
|
|
31
29
|
},
|
|
32
30
|
"license": "ISC",
|
|
33
|
-
"description": "",
|
|
31
|
+
"description": "添加翻译功能函数的导出",
|
|
34
32
|
"files": [
|
|
35
33
|
"lib/",
|
|
36
34
|
"index.js"
|