Skip to content

Commit 2d5ea93

Browse files
committed
update gulp to 4.x
1 parent efb3913 commit 2d5ea93

File tree

3 files changed

+1162
-389
lines changed

3 files changed

+1162
-389
lines changed

gulpfile.js

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,44 +25,44 @@ gulp.task('test', function(done) {
2525
}, done).start();
2626
});
2727

28-
gulp.task('test-pr', ['copy', 'dist'], function(done) {
29-
new karma.Server({
30-
configFile: __dirname + '/karma.conf.js',
31-
browsers: ['Firefox', 'Chrome_Travis'],
32-
singleRun: true
33-
}, done).start();
34-
});
35-
36-
gulp.task('test-ci', ['copy', 'dist'], function(done) {
37-
new karma.Server({
38-
configFile: __dirname + '/karma.conf.ci.js',
39-
singleRun: true
40-
}, done).start();
41-
});
42-
4328
gulp.task('copy', function() {
4429
gulp.src(sources)
4530
.pipe(gulp.dest('dist'));
4631
});
4732

48-
gulp.task('dist', ['copy'], function() {
33+
gulp.task('dist', gulp.series(['copy'], function() {
4934
return gulp.src(sources)
5035
.pipe(sourcemaps.init())
5136
.pipe(uglify())
5237
.pipe(rename(minified))
5338
.pipe(sourcemaps.write('./'))
5439
.pipe(gulp.dest('dist'));
55-
});
40+
}));
41+
42+
gulp.task('test-pr', gulp.series(['copy', 'dist'], function(done) {
43+
new karma.Server({
44+
configFile: __dirname + '/karma.conf.js',
45+
browsers: ['Firefox', 'Chrome_Travis'],
46+
singleRun: true
47+
}, done).start();
48+
}));
49+
50+
gulp.task('test-ci', gulp.series(['copy', 'dist'], function(done) {
51+
new karma.Server({
52+
configFile: __dirname + '/karma.conf.ci.js',
53+
singleRun: true
54+
}, done).start();
55+
}));
5656

5757
gulp.task('clean', del.bind(null, ['build', 'coverage', 'dist']));
5858

59-
gulp.task('pr', ['lint', 'test-pr']);
59+
gulp.task('pr', gulp.series(['lint', 'test-pr']));
6060

61-
gulp.task('ci', ['lint', 'test-ci'], function() {
61+
gulp.task('ci', gulp.series(['lint', 'test-ci'], function() {
6262
gulp.src('./coverage/**/lcov.info')
6363
.pipe(coveralls());
64-
});
64+
}));
6565

66-
gulp.task('default', ['clean'], function(cb) {
66+
gulp.task('default', gulp.series(['clean'], function(cb) {
6767
runSequence('lint', ['copy', 'dist'], 'test', cb);
68-
});
68+
}));

0 commit comments

Comments
 (0)