browser-sync-close-hook
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "browser-sync-close-hook", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Closes Browser Tabs which are connected to browserSync once browserSync disconnects (when stopping gulp for example)", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -35,4 +35,11 @@ browser-sync-close-hook | ||
Source | ||
--- | ||
The only thing this module does is exporting a function string which useses the clients browsers window.close function to close the tab. | ||
```js | ||
module.exports = "___browserSync___.socket.on('disconnect', window.close.bind(window));"; | ||
``` | ||
Credits | ||
--- | ||
https://gist.github.com/timthez for providing the original solution |
1379
44