forked from maximepvrt/angular-google-gapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
27 lines (22 loc) · 786 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
var del = require('del');
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var concat = require('gulp-concat');
var rename = require('gulp-rename');
var uglifySaveLicense = require('uglify-save-license');
gulp.task('clean', function () {
return del('dist/**.js');
});
gulp.task('build', ['clean'], function () {
return gulp.src(['src/angular-google-gapi.module.js', 'src/factories/*.js'])
.pipe(concat('angular-google-gapi.js'))
.pipe(gulp.dest('dist'))
.pipe(uglify({preserveComments: uglifySaveLicense}))
.pipe(rename({extname: '.min.js'}))
.pipe(gulp.dest('dist/'));
});
gulp.task('run', ['clean', 'build']);
gulp.task('watch', function () {
gulp.watch('src/**.js', ['run']);
});
gulp.task('default', ['run']);