pug-site-core 3.0.9 → 3.0.11
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 +6 -2
- package/package.json +2 -2
package/lib/generate.js
CHANGED
|
@@ -447,8 +447,10 @@ export async function buildFn() {
|
|
|
447
447
|
|
|
448
448
|
let totalCommonData = {};
|
|
449
449
|
totalCommonData.langCommon = config.commonData;
|
|
450
|
+
let languageData = (await import(paths.languageData)).default
|
|
450
451
|
await async.each(config.languageList, async (lang) => {
|
|
451
452
|
let commonData = await (await import(paths.getData))["get_common_data"](lang);
|
|
453
|
+
commonData.lang = _.merge(commonData.lang, languageData[lang]);
|
|
452
454
|
totalCommonData[lang] = commonData;
|
|
453
455
|
});
|
|
454
456
|
|
|
@@ -628,7 +630,8 @@ export async function buildStatic() {
|
|
|
628
630
|
}
|
|
629
631
|
} catch (error) {
|
|
630
632
|
console.error(
|
|
631
|
-
`处理数组数据失败 [lang: ${lang}, getDataFn: ${obj.getDataFn}]:`,
|
|
633
|
+
`处理数组数据失败 [lang: ${lang}, getDataFn: ${obj.getDataFn}]:`,
|
|
634
|
+
error
|
|
632
635
|
);
|
|
633
636
|
throw error;
|
|
634
637
|
}
|
|
@@ -725,7 +728,8 @@ export async function buildStatic() {
|
|
|
725
728
|
}
|
|
726
729
|
} catch (error) {
|
|
727
730
|
console.error(
|
|
728
|
-
`处理自定义HTML构建失败 [lang: ${lang}, config: ${JSON.stringify(obj)}]:`,
|
|
731
|
+
`处理自定义HTML构建失败 [lang: ${lang}, config: ${JSON.stringify(obj)}]:`,
|
|
732
|
+
error
|
|
729
733
|
);
|
|
730
734
|
throw error;
|
|
731
735
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pug-site-core",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.11",
|
|
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": "修复语言数据打包失败的问题以及commonData的合并问题",
|
|
56
56
|
"files": [
|
|
57
57
|
"lib/",
|
|
58
58
|
"index.js"
|