ld31-space-diggers/node_modules/browser-sync/lib/public/exit.js
Ruben Müller 760c1838ed Add game
2014-12-07 20:57:49 +01:00

21 lines
363 B
JavaScript

"use strict";
/**
* @param {BrowserSync} browserSync
* @returns {Function}
*/
module.exports = function (browserSync) {
function exit() {
if (browserSync.active) {
browserSync.events.emit("service:exit");
browserSync.cleanup();
}
process.exit();
}
process.on("SIGINT", exit);
return exit;
};