Skip to content

Commit

Permalink
update gulp to 4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
caub committed Sep 16, 2019
1 parent efb3913 commit 2d5ea93
Show file tree
Hide file tree
Showing 3 changed files with 1,162 additions and 389 deletions.
44 changes: 22 additions & 22 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,44 +25,44 @@ gulp.task('test', function(done) {
}, done).start();
});

gulp.task('test-pr', ['copy', 'dist'], function(done) {
new karma.Server({
configFile: __dirname + '/karma.conf.js',
browsers: ['Firefox', 'Chrome_Travis'],
singleRun: true
}, done).start();
});

gulp.task('test-ci', ['copy', 'dist'], function(done) {
new karma.Server({
configFile: __dirname + '/karma.conf.ci.js',
singleRun: true
}, done).start();
});

gulp.task('copy', function() {
gulp.src(sources)
.pipe(gulp.dest('dist'));
});

gulp.task('dist', ['copy'], function() {
gulp.task('dist', gulp.series(['copy'], function() {
return gulp.src(sources)
.pipe(sourcemaps.init())
.pipe(uglify())
.pipe(rename(minified))
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest('dist'));
});
}));

gulp.task('test-pr', gulp.series(['copy', 'dist'], function(done) {
new karma.Server({
configFile: __dirname + '/karma.conf.js',
browsers: ['Firefox', 'Chrome_Travis'],
singleRun: true
}, done).start();
}));

gulp.task('test-ci', gulp.series(['copy', 'dist'], function(done) {
new karma.Server({
configFile: __dirname + '/karma.conf.ci.js',
singleRun: true
}, done).start();
}));

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

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

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

gulp.task('default', ['clean'], function(cb) {
gulp.task('default', gulp.series(['clean'], function(cb) {
runSequence('lint', ['copy', 'dist'], 'test', cb);
});
}));
Loading

0 comments on commit 2d5ea93

Please sign in to comment.