Skip to content

Commit 50d847c

Browse files
committed
fix: use rimraf to remove files with glob patterns
1 parent 3fd123e commit 50d847c

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

packages/build/bin/run-clean.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Example usage:
2424
'use strict';
2525

2626
function run(argv, options) {
27-
const fs = require('fs-extra');
27+
const rimraf = require('rimraf');
2828
const path = require('path');
2929
const utils = require('./utils');
3030
var files = argv.slice(2);
@@ -42,7 +42,7 @@ function run(argv, options) {
4242
console.error('Skipping ' + f + ' as it is not inside the project');
4343
}
4444
} else {
45-
if (!options.dryRun) fs.removeSync(f);
45+
if (!options.dryRun) rimraf.sync(f);
4646
removed.push(f);
4747
}
4848
});

packages/build/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@
1717
"@types/node": "^8.9.5",
1818
"cross-spawn": "^6.0.3",
1919
"debug": "^3.1.0",
20+
"fs-extra": "^5.0.0",
2021
"mocha": "^5.0.0",
2122
"nyc": "^11.4.1",
2223
"prettier": "^1.10.2",
24+
"rimraf": "^2.6.2",
2325
"source-map-support": "^0.5.3",
2426
"strong-docs": "^1.9.1",
2527
"tslint": "^5.9.1",
@@ -44,8 +46,5 @@
4446
"test": "npm run mocha",
4547
"mocha": "node bin/run-mocha --timeout 30000 \"test/integration/*.js\"",
4648
"posttest": "npm run lint"
47-
},
48-
"devDependencies": {
49-
"fs-extra": "^5.0.0"
5049
}
5150
}

0 commit comments

Comments
 (0)