-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGulpfile.js
36 lines (31 loc) · 887 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
/*
* CrowdSound - Gulpfile.js
* Implementation based on source code by Kyle Jensen
* (c) 2015
*
* Renders about page
*/
// Gulpfile.js - We use Gulp to monitor our files and
// do two things when we make changes to the code:
// 1) check it for errors ("lint it") and 2) restart
// the application.
'use strict';
var gulp = require('gulp');
var nodemon = require('gulp-nodemon');
var jshint = require('gulp-jshint');
gulp.task('lint', function () {
gulp.src(['*.js', 'controllers/**/*.js', 'models/**/*.js', '!./node_modules/**', '!./.*'])
.pipe(jshint())
.pipe(jshint.reporter('jshint-stylish'));
});
gulp.task('default', function () {
nodemon({
script: 'start-app.js',
ext: 'js html',
ignore: ['node_modules/**', '.c9/*']
})
.on('change', ['lint'])
.on('restart', function () {
console.log('restarted!');
});
});