mirror of
https://gitee.com/openharmony/developtools_ace_js2bundle
synced 2024-11-23 07:20:22 +00:00
parent
c0b5e96b63
commit
b07967c8b6
@ -191,8 +191,9 @@ function compareCache(cachePath) {
|
||||
const cssFile = process.env.watchCSSFiles;
|
||||
|
||||
let files = [];
|
||||
let cssObject = {};
|
||||
if (fs.existsSync(cssFile)) {
|
||||
const cssObject = JSON.parse(fs.readFileSync(cssFile));
|
||||
cssObject = JSON.parse(fs.readFileSync(cssFile));
|
||||
if (cssObject['clear'] === true) {
|
||||
deleteFolderRecursive(cachePath);
|
||||
return;
|
||||
@ -212,6 +213,11 @@ function compareCache(cachePath) {
|
||||
if (!fs.existsSync(file)) {
|
||||
deleteFolderRecursive(cachePath);
|
||||
break;
|
||||
} else if (cssObject['atime'] && cssObject['atime'][file]) {
|
||||
if (cssObject['atime'][file] !== fs.statSync(file).atime.toString()) {
|
||||
deleteFolderRecursive(cachePath);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user