-
Notifications
You must be signed in to change notification settings - Fork 89
/
gulpfile.js
35 lines (30 loc) · 730 Bytes
/
gulpfile.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
var gulp = require('gulp');
var karma = require('karma').server;
var uglify = require('gulp-uglifyjs');
var runSequence = require('run-sequence');
/**
* Run test once and exit
*/
gulp.task('test', function (done) {
return karma.start({
configFile: __dirname + '/karma.conf.js',
singleRun: true
}, done);
});
/**
* Run test continually
*/
gulp.task('test:dev', function (done) {
return karma.start({
configFile: __dirname + '/karma.conf.js',
singleRun: false
}, done);
});
gulp.task('compress', function(done) {
return gulp.src('moment-recur.js')
.pipe(uglify('moment-recur.min.js'))
.pipe(gulp.dest('.'))
});
gulp.task('default', function() {
return runSequence('test','compress')
});