Delete files and directories without all the bullshit.
npm install eliminate --save
OBS: This package uses async/await and requires Node.js 7.6
const del = require('eliminate');
// ...
await del('path/or/file/to/delete.js');
Type: Promise
Deletes the directory or file. If the filepath is a non-empty directory, everything in it will be deleted recursively.
Type: String
The file or directory path to delete.
$ npm install --global eliminate
$ eliminate path/to/file.js
$ eliminate path/to/dir
MIT © Terkel Gjervig