-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathGulpfile.js
More file actions
40 lines (35 loc) · 1.08 KB
/
Gulpfile.js
File metadata and controls
40 lines (35 loc) · 1.08 KB
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
var gulp = require('gulp');
var karma = require('gulp-karma');
var bump = require('gulp-bump');
var git = require('gulp-git');
// Testing
gulp.task('test', function() {
gulp.src([
'test/mocha.conf.js',
'bower_components/angular/angular.js',
'bower_components/angular-mocks/angular-mocks.js',
'angular-re-captcha.js',
'test/unit/**/*.js'
]).pipe(karma({
configFile: './test/karma.config.js',
action: (gulp.env.travis ? 'run' : 'watch'),
browsers: (gulp.env.travis ? ['Firefox'] : ['Chrome']),
singleRun: (gulp.env.travis ? true : false),
}));
});
// Dump the version
gulp.task('bump', function() {
gulp.src('./package.json')
.pipe(bump())
.pipe(gulp.dest('./'));
gulp.src('./bower.json')
.pipe(bump())
.pipe(gulp.dest('./'));
});
// Tag the repo with a version
gulp.task('tag', function() {
var pkg = require('./package.json');
var version = 'v' + pkg.version;
gulp.src('./')
.pipe(git.tag(version, 'Release ('+version+')')).on('error', console.log);
});