forked from mixi-inc/JavaScriptTraining
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgulpfile.js
More file actions
44 lines (39 loc) · 1.12 KB
/
gulpfile.js
File metadata and controls
44 lines (39 loc) · 1.12 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
41
42
43
44
var gulp = require('gulp')
, jshint = require('gulp-jshint')
, nodemon = require('./index')
, path = require('path')
// gulp.task('test', function () {
// gulp.src('./test/*-test.js')
// .pipe(jshint({ asi: true, laxcomma: true }))
// .pipe(mocha({ ui: 'bdd' }))
// })
gulp.task('lint', function () {
gulp.src('./*/**.js')
.pipe(jshint())
})
gulp.task('cssmin', function () { /* void */ })
gulp.task('afterstart', function () {
console.log('proc has finished restarting!')
})
gulp.task('test', ['lint'], function () {
nodemon({
script: './test/server.js'
, verbose: true
, env: {
'NODE_ENV': 'development'
}
, watch: './'
, ext: 'js coffee'
// , tasks: ['lint']
// , tasks: function (files) {
// var tasks = []
// files.forEach(function (file) {
// if (path.extname(file) === '.js' && !~tasks.indexOf('lint')) tasks.push('lint')
// if (path.extname(file) === '.css' && !~tasks.indexOf('cssmin')) tasks.push('cssmin')
// })
// return tasks
// }
// , nodeArgs: ['--debug']
})
.on('restart', 'cssmin')
})