Last active
August 29, 2015 14:08
-
-
Save iamphill/099dc4365821e2c345d5 to your computer and use it in GitHub Desktop.
Grunt IIS kill on exit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function (grunt) { | |
grunt.initConfig({ | |
// Some other grunt tasks | |
iisexpress: { | |
server: { | |
options: { | |
path: require('path').resolve('.') + '/[PATH OF WEBSITE HERE]', | |
killOn: 'iis.kill' | |
} | |
} | |
} | |
}); | |
process.on('SIGINT', function() { | |
grunt.event.emit('iis.kill'); | |
process.exit(1); | |
}); | |
grunt.registerTask('default', ['iisexpress', /*Other tasks here*/]); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using Grunt module https://www.npmjs.org/package/grunt-iisexpress for this.
it is awesome to save having to open to Visual Studio which can kill any PC in a few minutes.