-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Removed the need for del Removed the need for del as newer versions have broken backwards compatibility. del mainly uses rimraf for deleting folders and files, replaceing it with rimraf only is a minimal change. * Disable glob on rimraf calls * Added glob disable to wrong call * Wrapped rimraf to simplify solution
- Loading branch information
Showing
4 changed files
with
22 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
var rimraf = require ( 'rimraf' ).sync; | ||
var fs = require ( 'graceful-fs' ); | ||
|
||
module.exports = function del (file) { | ||
if ( fs.existsSync ( file ) ) { | ||
//if rimraf doesn't throw then the file has been deleted or didn't exist | ||
rimraf( file, { glob:false }); | ||
return true; | ||
} | ||
return false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters