pug-site-core 2.0.18 → 2.0.20
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 +0 -10
- package/package.json +2 -2
package/lib/generate.js
CHANGED
|
@@ -282,13 +282,6 @@ export async function fetchDataToJsonFile(args) {
|
|
|
282
282
|
await checkData(data, language, obj.getDataFn);
|
|
283
283
|
let outPutPath = obj.outPutPath.split("/").join(pathSymbol);
|
|
284
284
|
if (Array.isArray(data)) {
|
|
285
|
-
await fse.remove(
|
|
286
|
-
paths.resolveRoot(
|
|
287
|
-
"jsonData",
|
|
288
|
-
language,
|
|
289
|
-
...outPutPath.split(pathSymbol).slice(0, -1)
|
|
290
|
-
)
|
|
291
|
-
);
|
|
292
285
|
let name = outPutPath.split(pathSymbol).pop().replace(/\..*$/, "");
|
|
293
286
|
const regex = /^\[.+\]$/;
|
|
294
287
|
if (regex.test(name)) {
|
|
@@ -337,9 +330,6 @@ export async function fetchDataToJsonFile(args) {
|
|
|
337
330
|
let data = await getData[funName](language);
|
|
338
331
|
await checkData(data, language, funName);
|
|
339
332
|
if (Array.isArray(data)) {
|
|
340
|
-
await fse.remove(
|
|
341
|
-
paths.resolveRoot("jsonData", language, ...jsonFilePath.slice(0, -1))
|
|
342
|
-
);
|
|
343
333
|
await async.eachLimit(data, 12, async (item, index) => {
|
|
344
334
|
let lastJsonFilePath;
|
|
345
335
|
if (item.page_name) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pug-site-core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.20",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"ws": "^8.18.0"
|
|
47
47
|
},
|
|
48
48
|
"license": "ISC",
|
|
49
|
-
"description": "
|
|
49
|
+
"description": "再次修复错误的删除文件问题",
|
|
50
50
|
"files": [
|
|
51
51
|
"lib/",
|
|
52
52
|
"index.js"
|