Skip to content

Commit

Permalink
Nodemon no longer crashes on restart. Hurray.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackson Gariety committed Jan 8, 2014
1 parent 829145d commit 15fbafe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions Gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
var gulp = require('gulp')
, jshint = require('gulp-jshint')
, mocha = require('gulp-mocha')
, nodemon = require('./index')

gulp.task('test', function () {
gulp.src('./test/*-test.js')
.pipe(jshint({ asi: true, laxcomma: true }))
.pipe(mocha({ ui: 'bdd' }))
})
})
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ module.exports = function (settings) {
return map(function (file, callback) {
try {
// Our script
var script = nodemon({
nodemon({
script: file.path
, args: []
, restartable: 'rs'
})

// Forward ^C to gulp
.on('exit', process.exit.bind(process))
process.on('SIGINT', function () { process.exit() })
} catch (e) { throw e }

callback(null, file)
})
}

0 comments on commit 15fbafe

Please sign in to comment.