pug-site-core 3.0.23 → 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.
Files changed (2) hide show
  1. package/lib/generate.js +5 -1
  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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pug-site-core",
3
- "version": "3.0.23",
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": "增加ro语言",
55
+ "description": "getData不删旧数据,增量写文件",
56
56
  "files": [
57
57
  "lib/",
58
58
  "index.js"