Skip to content

Commit

Permalink
fix: use rimraf to remove files with glob patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondfeng committed Mar 22, 2018
1 parent 3fd123e commit 50d847c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/build/bin/run-clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Example usage:
'use strict';

function run(argv, options) {
const fs = require('fs-extra');
const rimraf = require('rimraf');
const path = require('path');
const utils = require('./utils');
var files = argv.slice(2);
Expand All @@ -42,7 +42,7 @@ function run(argv, options) {
console.error('Skipping ' + f + ' as it is not inside the project');
}
} else {
if (!options.dryRun) fs.removeSync(f);
if (!options.dryRun) rimraf.sync(f);
removed.push(f);
}
});
Expand Down
5 changes: 2 additions & 3 deletions packages/build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@
"@types/node": "^8.9.5",
"cross-spawn": "^6.0.3",
"debug": "^3.1.0",
"fs-extra": "^5.0.0",
"mocha": "^5.0.0",
"nyc": "^11.4.1",
"prettier": "^1.10.2",
"rimraf": "^2.6.2",
"source-map-support": "^0.5.3",
"strong-docs": "^1.9.1",
"tslint": "^5.9.1",
Expand All @@ -44,8 +46,5 @@
"test": "npm run mocha",
"mocha": "node bin/run-mocha --timeout 30000 \"test/integration/*.js\"",
"posttest": "npm run lint"
},
"devDependencies": {
"fs-extra": "^5.0.0"
}
}

0 comments on commit 50d847c

Please sign in to comment.