forked from softmonkeyjapan/angular-google-picker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
33 lines (27 loc) · 814 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
var gulp = require('gulp');
var karma = require('karma').server;
var rename = require('gulp-rename');
var uglify = require('gulp-uglify');
// Copy non-uglify version to "dist"
gulp.task('copy', ['test'], function () {
return gulp.src('src/*.js')
.pipe(gulp.dest('dist'));
});
// Create an uglify version to "dist" and "example"
gulp.task('uglify', ['test'], function () {
return gulp.src('src/*.js')
.pipe(uglify())
.pipe(rename('google-picker.min.js'))
.pipe(gulp.dest('dist'))
.pipe(gulp.dest('example'));
});
gulp.task('watch', function () {
gulp.watch('src/*.js', ['copy', 'uglify']);
});
gulp.task('test', function (done) {
karma.start({
configFile: __dirname + '/test/karma.conf.js',
singleRun: true
}, done);
});
gulp.task('default', ['test', 'copy', 'uglify']);