Skip to content

Commit

Permalink
remove dep on rimraf and mkdirp
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmywarting committed Jan 31, 2023
1 parent 0afeb5c commit 0072510
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/grunt/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ 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;

Expand Down Expand Up @@ -182,6 +181,7 @@ file.mkdir = function(dirpath, mode) {
if (grunt.option('no-write')) { return; }
try {
mkdirp(dirpath, { mode: mode });
fs.mkdirSync(dirpath, { recursive: true, mode })
} catch (e) {
throw grunt.util.error('Unable to create directory "' + dirpath + '" (Error code: ' + e.code + ').', e);
}
Expand Down Expand Up @@ -373,7 +373,7 @@ file.delete = function(filepath, options) {
try {
// Actually delete. Or not.
if (!nowrite) {
rimraf.sync(filepath);
fs.rmSync(filepath);
}
grunt.verbose.ok();
return true;
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 0072510

Please sign in to comment.