How to use the nativeSync function from rimraf
Find comprehensive JavaScript rimraf.nativeSync code examples handpicked from public code repositorys.
8 9 10 11 12 13 14 15 16 17 18
// utils const cleanSnapshotsDir = (options) => { const snapshotsDir = options.snapshotsDir; if (fs.existsSync(snapshotsDir)) { console.log(`${EC.cyan('[clean]')} remove chromium snapshots dir: ${EC.magenta(snapshotsDir)} ...`); rimraf.nativeSync(snapshotsDir); } }; const cleanStatsFile = (options) => {
8
48
0
+ 7 other calls in file
35 36 37 38 39 40 41 42 43 44 45 46
} const nycOutputFolder = '.nyc_output' if (fs.existsSync(nycOutputFolder)) { debug('deleting the existing folder %s', nycOutputFolder) rimraf.nativeSync(nycOutputFolder) } if (!fs.existsSync(nycOutputFolder)) { debug('creating folder %s', nycOutputFolder)
1
8
0
+ 4 other calls in file
GitHub: cenfun/starfall-cli
1248 1249 1250 1251 1252 1253 1254 1255 1256 1257
}, rmSync(f, option = {}) { let ok = true; try { rimraf.nativeSync(f, option); } catch (err) { console.error(err); ok = false; }
0
1
1
+ 2 other calls in file
rimraf.sync is the most popular function in rimraf (722 examples)