Every line of 'rimraf node_modules' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
9 function clean(file) { 10 return rimraf(file, (err) => { 11 console.log(`${chalk.yellow('removed:')} ${chalk.grey(file)}`); 12 }); 13 }
22 function rimraf_err(e) { 23 if (e) { 24 console.error(e.message); 25 process.exit(1); 26 } 27 }
111 function cleanNodeModulePackages() { 112 return del(cleanGlobs); 113 }
920 rimraf(filePath: FilePath) { 921 super.rimraf(filePath); 922 return this.handleFn('rimraf', [filePath]); 923 }
33 function node_modules(dir) { 34 var fp = path.resolve(path.dirname(dir), 'node_modules/update'); 35 return require.resolve(fp); 36 }
13 function rimraf(dirPath) { 14 if (fs.existsSync(dirPath)) { 15 fs.readdirSync(dirPath).forEach((entry) => { 16 const entryPath = path.join(dirPath, entry); 17 if (fs.lstatSync(entryPath).isDirectory()) { 18 rimraf(entryPath); 19 } else { 20 fs.unlinkSync(entryPath); 21 } 22 }); 23 fs.rmdirSync(dirPath); 24 } 25 }
28 module.exports = function clean(done) { 29 return rimraf(config.dist, (err) => ( 30 done(err) 31 )); 32 };
90 function rmdirSync (path) { 91 try { 92 rimraf.sync(path); 93 } catch(e) { 94 if ( e.code != 'ENOENT' ) throw e; 95 } 96 }
55 function removeOldFiles() { 56 rimraf.sync(getWebHookDirectory()); 57 }
197 function rimrafDontThrow(directory: string) { 198 fs.removeSync(directory); 199 }