-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
33 lines (28 loc) · 821 Bytes
/
gulpfile.js
File metadata and controls
33 lines (28 loc) · 821 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
var gulp = require('gulp');
var jshint = require('gulp-jshint');
var nodemon = require('gulp-nodemon');
var qunit = require('node-qunit-phantomjs');
gulp.task('test', function() {
qunit('./public/unittest/createcalctest.html');
});
gulp.task('js', function() {
return gulp.src(['server.js', 'public/app/*.js', 'public/app/**/*.js'])
.pipe(jshint())
.pipe(jshint.reporter('default'));
});
gulp.task('watch', function() {
gulp.watch(['server.js', 'public/app/*.js', 'public/app/**/*.js'], ['js']);
});
gulp.task('nodemon', function() {
nodemon({
script: 'server.js',
ext: 'js html'
})
.on('start', ['test'])
.on('start', ['watch'])
.on('change', ['watch'])
.on('restart', function() {
console.log('Restarted!');
});
});
gulp.task('default', ['nodemon']);