-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgulpfile.js
More file actions
44 lines (37 loc) · 1005 Bytes
/
gulpfile.js
File metadata and controls
44 lines (37 loc) · 1005 Bytes
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
41
42
43
44
var gulp = require('gulp'),
nodemon = require('gulp-nodemon'),
bump = require('gulp-bump'),
jshint = require('gulp-jshint'),
stylish = require('jshint-stylish'),
paths = {};
paths.serverScripts = [
'./index.js',
'./config/**/*.js',
'./models/**/*.js',
'./controllers/**/*.js'
];
gulp.task('develop', ['jshint'], function () {
return nodemon({
script: './index.js',
watch: paths.serverScripts
}).on('change', ['jshint']);
});
gulp.task('jshint', function () {
return gulp.src(paths.serverScripts).pipe(jshint())
.pipe(jshint.reporter(stylish));
});
gulp.task('bump', function () {
return gulp.src('./package.json')
.pipe(bump())
.pipe(gulp.dest('./'));
});
gulp.task('bump:minor', function () {
return gulp.src('./package.json')
.pipe(bump({type: 'minor'}))
.pipe(gulp.dest('./'));
});
gulp.task('bump:major', function () {
return gulp.src('./package.json')
.pipe(bump({type: 'major'}))
.pipe(gulp.dest('./'));
});