mirror of
https://github.com/Raghu-Ch/nodeRestAPI.git
synced 2026-02-11 05:03:02 -05:00
initial commit
This commit is contained in:
45
node_modules/gulp-nodemon/Gulpfile.js
generated
vendored
Normal file
45
node_modules/gulp-nodemon/Gulpfile.js
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
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 () {
|
||||
var stream = nodemon({
|
||||
nodemon: require('nodemon')
|
||||
, script: './test/server.js'
|
||||
, verbose: true
|
||||
, env: {
|
||||
'NODE_ENV': 'development'
|
||||
}
|
||||
, watch: './'
|
||||
, ext: 'js coffee'
|
||||
})
|
||||
|
||||
stream
|
||||
.on('restart', 'cssmin')
|
||||
.on('crash', function (){
|
||||
console.error('\nApplication has crashed!\n')
|
||||
console.error('Restarting in 2 seconds...\n')
|
||||
setTimeout(function () {
|
||||
stream.emit('restart')
|
||||
}, 2000)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user