commit inicial do projeto
This commit is contained in:
19
.erb/scripts/clean.js
Normal file
19
.erb/scripts/clean.js
Normal file
@@ -0,0 +1,19 @@
|
||||
const rimraf = require('rimraf');
|
||||
const fs = require('fs');
|
||||
const webpackPaths = require('../configs/webpack.paths').default;
|
||||
|
||||
const foldersToRemove = [
|
||||
webpackPaths.distPath,
|
||||
webpackPaths.buildPath,
|
||||
webpackPaths.dllPath,
|
||||
];
|
||||
|
||||
foldersToRemove.forEach((folder) => {
|
||||
if (fs.existsSync(folder)) {
|
||||
try {
|
||||
rimraf.sync(folder);
|
||||
} catch (error) {
|
||||
console.log(`Warning: Could not remove ${folder}:`, error.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user