Releases: sindresorhus/del
Releases · sindresorhus/del
v4.0.0
3.0.0
- Drops support for Node.js 0.10 and 0.12.
- Adds a
concurrency
option.
2.0.0 - Promisification
The API now returns a promise instead of accepting a callback function.
Update your code accordingly:
var del = require('del');
- del('unicorn.png', function (error, paths) {
+ del('unicorn.png').then(function (paths) {
console.log('Deleted files/folders:\n', paths.join('\n'));
});
And with gulp:
var gulp = require('gulp');
var del = require('del');
- gulp.task('clean', function (cb) {
- del('unicorn.png', cb);
+ gulp.task('clean', function () {
+ return del('unicorn.png');
});
gulp.task('default', ['clean']);