Skip to content

Commit 06b7a8c

Browse files
authored
fix: Add support node 12.2.0 when using singleFile parameter (#87)
1 parent 947e894 commit 06b7a8c

File tree

3 files changed

+187
-192
lines changed

3 files changed

+187
-192
lines changed

hooks/01_removeNotRelevantParts.js

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const fs = require('fs');
22
const path = require('path');
3+
const rimraf = require('rimraf');
34

45
module.exports = {
56
'generate:after': generator => {
@@ -18,8 +19,13 @@ module.exports = {
1819
}
1920
};
2021

21-
fs.rmdir(jsDir, {recursive: true}, callback);
22-
fs.rmdir(cssDir, {recursive: true}, callback);
22+
const opts = {
23+
disableGlob: true,
24+
maxBusyTries: 3
25+
};
26+
27+
rimraf(jsDir, opts, callback);
28+
rimraf(cssDir, opts, callback);
2329
}
2430
}
25-
};
31+
};

0 commit comments

Comments
 (0)