ld31-space-diggers/node_modules/browser-sync/lib/public/exit.js

21 lines
363 B
JavaScript
Raw Normal View History

2014-12-07 20:57:49 +01:00
"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;
};