diff --git a/lib/grunt/file.js b/lib/grunt/file.js index 82863f35..9619e808 100644 --- a/lib/grunt/file.js +++ b/lib/grunt/file.js @@ -14,9 +14,7 @@ file.glob = require('glob'); file.minimatch = require('minimatch'); file.findup = require('findup-sync'); var YAML = require('js-yaml'); -var rimraf = require('rimraf'); var iconv = require('iconv-lite'); -var mkdirp = require('mkdirp').sync; // Windows? var win32 = process.platform === 'win32'; @@ -181,7 +179,7 @@ file.expandMapping = function(patterns, destBase, options) { file.mkdir = function(dirpath, mode) { if (grunt.option('no-write')) { return; } try { - mkdirp(dirpath, { mode: mode }); + fs.mkdirSync(dirpath, { recursive: true, mode: mode }); } catch (e) { throw grunt.util.error('Unable to create directory "' + dirpath + '" (Error code: ' + e.code + ').', e); } @@ -373,7 +371,7 @@ file.delete = function(filepath, options) { try { // Actually delete. Or not. if (!nowrite) { - rimraf.sync(filepath); + fs.rmSync(filepath, { recursive: true, force: true }); } grunt.verbose.ok(); return true; diff --git a/package.json b/package.json index a68880e4..ec58aeb0 100644 --- a/package.json +++ b/package.json @@ -49,9 +49,7 @@ "iconv-lite": "~0.6.3", "js-yaml": "~3.14.0", "minimatch": "~3.0.4", - "mkdirp": "~2.1.3", - "nopt": "~3.0.6", - "rimraf": "~4.1.2" + "nopt": "~3.0.6" }, "devDependencies": { "difflet": "~1.0.1",