Skip to content

Commit

Permalink
fix: Fix sideEffectFiles cache file issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed May 14, 2022
1 parent 4684d88 commit 4749679
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .idoc/.filesStat.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@
"birthtime": "2022-04-10T14:24:24.105Z"
},
"README.md": {
"atime": "2022-05-13T17:48:55.217Z",
"mtime": "2022-05-13T17:48:55.634Z",
"ctime": "2022-05-13T17:48:55.634Z",
"atime": "2022-05-14T07:30:44.357Z",
"mtime": "2022-05-14T07:30:53.452Z",
"ctime": "2022-05-14T07:30:53.452Z",
"birthtime": "2022-05-01T16:43:37.278Z"
}
}
2 changes: 1 addition & 1 deletion src/scripts/watch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function watch() {
copyThemeFileAsset(filepath);
} else if (/\.(md|markdown)/i.test(filepath)) {
await cacheFile.update(filepath);
cacheFile.save();
await cacheFile.save();
compilation(filepath);
} else {
const assetPath = getOutput(filepath);
Expand Down
3 changes: 3 additions & 0 deletions src/utils/conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@ export class Conf {
return;
}
const stat = await getStat(path.resolve(filename));
if (/.(md|markdown)$/.test(stat.path)) {
cacheFile.add(stat);
}
this.data.asset.push(stat);
}),
);
Expand Down

0 comments on commit 4749679

Please sign in to comment.