Upgrade `del` and fix its usage in the gulpfile

master
Sindre Sorhus 2015-10-02 21:07:10 +07:00
parent 46eac36690
commit 64a126fb34
2 changed files with 4 additions and 8 deletions

View File

@ -265,7 +265,7 @@ gulp.task('scripts', ['jscs', 'jshint'], () => {
});
// Clean Output Directory
gulp.task('clean', del.bind(null, ['dist', '.publish'], {dot: true}));
gulp.task('clean', () => del(['dist', '.publish']));
// Copy package manger and LICENSE files to dist
gulp.task('metadata', () => {
@ -308,12 +308,8 @@ gulp.task('mocha:closure', ['closure'], () => {
.pipe($.rename('temp.html'))
.pipe(gulp.dest('test'))
.pipe($.mochaPhantomjs({reporter: 'tap'}))
.on('finish', () => {
del('test/temp.html', {force: true});
})
.on('error', () => {
del('test/temp.html', {force: true});
});
.on('finish', () => del.sync('test/temp.html'))
.on('error', () => del.sync('test/temp.html'));
});
gulp.task('test', ['jshint', 'jscs', 'mocha', 'mocha:closure']);

View File

@ -13,7 +13,7 @@
"browser-sync": "^2.2.3",
"chai": "^2.0.0",
"chai-jquery": "^2.0.0",
"del": "^1.1.1",
"del": "^2.0.2",
"drool": "^0.2.1",
"escodegen": "^1.6.1",
"google-closure-compiler": "",