Skip to content

Releases: sindresorhus/del

v4.0.0

03 Mar 19:28
Compare
Choose a tag to compare

Breaking:

Enhancements:

v3.0.0...v4.0.0

3.0.0

09 Jun 14:41
Compare
Choose a tag to compare
  • Drops support for Node.js 0.10 and 0.12.
  • Adds a concurrency option.

v2.2.2...v3.0.0

2.0.0 - Promisification

23 Sep 15:52
Compare
Choose a tag to compare

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']);