Skip to content

Commit

Permalink
called fix (#32)
Browse files Browse the repository at this point in the history
* called fix

* added link to api

* mistake
  • Loading branch information
David Narbutovich authored and evilebottnawi committed Feb 21, 2018
1 parent f2216b2 commit 7f7efc4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# browser-sync-dev-hot-webpack-plugin

[![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)
[![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)
[![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)
[![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)
[![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)
[![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)
[![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)
[![Greenkeeper badge](https://badges.greenkeeper.io/itgalaxy/browser-sync-dev-hot-webpack-plugin.svg)](https://greenkeeper.io/)

Expand Down Expand Up @@ -32,7 +32,12 @@ const webpackConfig = {
devMiddleware: DEV_MIDDLEWARE_OPTIONS,
hotMiddleware: HOT_MIDDLEWARE_OPTIONS,
callback() {
console.log('Callback')
console.log('Callback');
/*
// Use browser sync server api (https://browsersync.io/docs/api)
const { watcher: bs } = this;
bs.notify("Hello! It's callback function from BrowserSyncHotPlugin!");
*/
}
})
// Other plugins...
Expand All @@ -49,13 +54,13 @@ See related packages docs.

## Related

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

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

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

## Contribution
Expand Down
2 changes: 1 addition & 1 deletion src/BrowserSyncDevHotWebpackPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class BrowserSyncDevHotWebpackPlugin extends EventEmitter {
this.browserSyncURLUI = URLs.get("ui");
this.browserSyncURLUIExternal = URLs.get("ui-external");

this.options.callback.bind(this);
this.options.callback.call(this);
});
});
}
Expand Down

0 comments on commit 7f7efc4

Please sign in to comment.