Skip to content

Commit 7f7efc4

Browse files
David Narbutovichevilebottnawi
David Narbutovich
authored andcommitted
called fix (#32)
* called fix * added link to api * mistake
1 parent f2216b2 commit 7f7efc4

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

Diff for: README.md

+12-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# browser-sync-dev-hot-webpack-plugin
22

3-
[![NPM version](https://img.shields.io/npm/v/browser-sync-dev-hot-webpack-plugin.svg)](https://www.npmjs.org/package/browser-sync-dev-hot-webpack-plugin)
4-
[![Travis Build Status](https://img.shields.io/travis/itgalaxy/browser-sync-dev-hot-webpack-plugin/master.svg?label=build)](https://travis-ci.org/itgalaxy/browser-sync-dev-hot-webpack-plugin)
5-
[![dependencies Status](https://david-dm.org/itgalaxy/browser-sync-dev-hot-webpack-plugin/status.svg)](https://david-dm.org/itgalaxy/browser-sync-dev-hot-webpack-plugin)
3+
[![NPM version](https://img.shields.io/npm/v/browser-sync-dev-hot-webpack-plugin.svg)](https://www.npmjs.org/package/browser-sync-dev-hot-webpack-plugin)
4+
[![Travis Build Status](https://img.shields.io/travis/itgalaxy/browser-sync-dev-hot-webpack-plugin/master.svg?label=build)](https://travis-ci.org/itgalaxy/browser-sync-dev-hot-webpack-plugin)
5+
[![dependencies Status](https://david-dm.org/itgalaxy/browser-sync-dev-hot-webpack-plugin/status.svg)](https://david-dm.org/itgalaxy/browser-sync-dev-hot-webpack-plugin)
66
[![devDependencies Status](https://david-dm.org/itgalaxy/browser-sync-dev-hot-webpack-plugin/dev-status.svg)](https://david-dm.org/itgalaxy/browser-sync-dev-hot-webpack-plugin?type=dev)
77
[![Greenkeeper badge](https://badges.greenkeeper.io/itgalaxy/browser-sync-dev-hot-webpack-plugin.svg)](https://greenkeeper.io/)
88

@@ -32,7 +32,12 @@ const webpackConfig = {
3232
devMiddleware: DEV_MIDDLEWARE_OPTIONS,
3333
hotMiddleware: HOT_MIDDLEWARE_OPTIONS,
3434
callback() {
35-
console.log('Callback')
35+
console.log('Callback');
36+
/*
37+
// Use browser sync server api (https://browsersync.io/docs/api)
38+
const { watcher: bs } = this;
39+
bs.notify("Hello! It's callback function from BrowserSyncHotPlugin!");
40+
*/
3641
}
3742
})
3843
// Other plugins...
@@ -49,13 +54,13 @@ See related packages docs.
4954

5055
## Related
5156

52-
- [browser-sync](https://github.com/browsersync/browser-sync) - Keep multiple browsers & devices
57+
- [browser-sync](https://github.com/browsersync/browser-sync) - Keep multiple browsers & devices
5358
in sync when building websites.
5459

55-
- [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) - Offers a dev middleware for webpack,
60+
- [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) - Offers a dev middleware for webpack,
5661
which arguments a live bundle to a directory.
5762

58-
- [webpack-hot-middleware](https://github.com/glenjamin/webpack-hot-middleware) - Webpack hot reloading
63+
- [webpack-hot-middleware](https://github.com/glenjamin/webpack-hot-middleware) - Webpack hot reloading
5964
you can attach to your own server.
6065

6166
## Contribution

Diff for: src/BrowserSyncDevHotWebpackPlugin.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ class BrowserSyncDevHotWebpackPlugin extends EventEmitter {
179179
this.browserSyncURLUI = URLs.get("ui");
180180
this.browserSyncURLUIExternal = URLs.get("ui-external");
181181

182-
this.options.callback.bind(this);
182+
this.options.callback.call(this);
183183
});
184184
});
185185
}

0 commit comments

Comments
 (0)