-
Notifications
You must be signed in to change notification settings - Fork 229
/
gulpfile.babel.js
40 lines (35 loc) · 939 Bytes
/
gulpfile.babel.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import gulp from 'gulp';
import babel from 'gulp-babel';
import uglify from 'gulp-uglify';
import rename from 'gulp-rename';
import clean from 'gulp-clean';
import { Server } from 'karma';
gulp.task('babel', () =>
gulp.src('src/angular-vs-repeat.js')
.pipe(babel())
.pipe(gulp.dest('dist'))
);
gulp.task('min', ['babel'], () =>
gulp.src('dist/angular-vs-repeat.js')
.pipe(uglify())
.pipe(rename('angular-vs-repeat.min.js'))
.pipe(gulp.dest('dist'))
);
gulp.task('karma', ['build'], (done) => {
new Server({
configFile: __dirname + '/karma.conf.js',
singleRun: true,
}, done).start();
});
gulp.task('karma-travis', ['build'], (done) => {
new Server({
configFile: __dirname + '/karma.conf.js',
singleRun: true,
browsers: [
'Firefox',
],
}, done).start();
});
gulp.task('build', ['babel', 'min']);
gulp.task('test', ['build', 'karma']);
gulp.task('travis', ['build', 'karma-travis']);