Skip to content

Commit

Permalink
fix: stop gulp tasks before exiting
Browse files Browse the repository at this point in the history
Fixes #52
  • Loading branch information
dignifiedquire committed Sep 6, 2016
1 parent b071b5c commit bd5773b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions gulp/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

const gulpRequire = require('gulp-require-tasks')
const path = require('path')
const onExit = require('signal-exit')

module.exports = (gulp) => {
gulp = gulp || require('gulp')
Expand All @@ -22,4 +23,9 @@ module.exports = (gulp) => {
process.exit()
})
})

onExit(function (code) {
gulp.stop()
process.exit(code)
})
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"rimraf": "^2.5.4",
"run-sequence": "^1.2.2",
"semver": "^5.3.0",
"signal-exit": "^3.0.0",
"stream-http": "^2.3.1",
"transform-loader": "^0.2.3",
"webpack": "^2.1.0-beta.20",
Expand All @@ -91,4 +92,4 @@
"Stephen Whitmore <stephen.whitmore@gmail.com>",
"greenkeeperio-bot <support@greenkeeper.io>"
]
}
}

0 comments on commit bd5773b

Please sign in to comment.