Create a gist now

Instantly share code, notes, and snippets.

@ignlg / forked from timthez/closer.js
Last active Aug 26, 2015

What would you like to do?
Close tab on browserSync disconnection, Gulp example
browserSync = require 'browser-sync'
plugin: ->
'client:js': '
/* Close tab when server dies */
(function (bs) {
bs.socket.on("disconnect", function (client) { window.close(); });
# Static server
gulp.task 'browser-sync', ->
server: "./dist/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment