forked from chrisronline/angular-promise-cache
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
30 lines (26 loc) · 854 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
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var karma = require('gulp-karma');
gulp.task('build', function() {
return gulp.src('angular-promise-cache.js')
.pipe(uglify({preserveComments: 'some'}))
.pipe(rename('angular-promise-cache.min.js'))
.pipe(gulp.dest('.'));
});
gulp.task('test', function() {
return gulp.src([
'bower_components/angular/angular.min.js',
'bower_components/angular-mocks/angular-mocks.js',
'angular-promise-cache.js',
'angular-promise-cache.test.js'
])
.pipe(karma({configFile:'karma.conf.js',action:'run'}));
});
gulp.task('version', function() {
var bump = require('gulp-bump');
gulp.src(['./bower.json', './package.json'])
.pipe(bump())
.pipe(gulp.dest('./'));
});
gulp.task('default', ['test', 'build']);