Adds automatic browser reloading support to
brunch when using the brunch watch
command.
The plugin uses BrowserSync technology to keep multiple browsers & devices in sync when building websites.
Make sure that you have removed auto-reload brunch from your package.json if you were using it.
Install the plugin via npm with npm install --save browser-sync-brunch
.
Or, do manual install:
"browser-sync-brunch": "x.y.z"
to package.json
of your brunch app."browser-sync-brunch": "git+ssh://git@github.com:ocombe/browser-sync-brunch.git"
.In most cases, browser-sync-brunch works out of the box without any further configuration. Stylesheet and image changes will be applied seamlessly, and any other changes will trigger a page refresh.
If customization is needed or desired, settings can be modified in your brunch config file (such as brunch-config.coffee
).
You can use any BrowserSync option, refer to their documentation for the complete list.
Example:
exports.config: {
...
plugins: {
browserSync: {
port: 3333,
logLevel: "debug"
}
}
}
**Be careful, this plugin won't work with Brunch workers enabled because of an error in Brunch source code.***