1var rimraf = require( 'rimraf' ).sync; 2var fs = require( 'fs' ); 3 4module.exports = function del( file ) { 5 if ( fs.existsSync( file ) ) { 6 //if rimraf doesn't throw then the file has been deleted or didn't exist 7 rimraf( file, { 8 glob: false 9 } ); 10 return true; 11 } 12 return false; 13}; 14