-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgulpfile.js
40 lines (34 loc) · 983 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
36
37
38
39
40
'use strict';
var gulp = require('gulp'),
del = require('del'),
concat = require('gulp-concat'),
rename = require('gulp-rename'),
ngAnnotate = require('gulp-ng-annotate'),
uglify = require('gulp-uglify'),
bump = require('gulp-bump');
gulp.task('clean', function () {
return del(['dist']);
});
gulp.task('build', ['clean'], function () {
return gulp
.src([
'src/module.js',
'src/provider.js',
'src/config.js'
])
.pipe(concat('cas-auth-api.js'))
.pipe(ngAnnotate())
.pipe(gulp.dest('dist'))
.pipe(uglify())
.pipe(rename('cas-auth-api.min.js'))
.pipe(gulp.dest('dist'));
});
gulp.task('default', ['build']);
gulp.task('bump', function () {
return gulp.src(['./bower.json', './package.json'])
.pipe(bump({type: 'patch'}))
.pipe(gulp.dest('./'));
});
gulp.task('watch', function () {
gulp.watch('src/**/*.js', ['build']);
});