https://github.com/dustinfarris/broccoli-bs
Use browser-sync in your broccoli-pipeline
https://github.com/dustinfarris/broccoli-bs
broccoli-plugin browser-sync
Last synced: 2 months ago
JSON representation
Use browser-sync in your broccoli-pipeline
- Host: GitHub
- URL: https://github.com/dustinfarris/broccoli-bs
- Owner: dustinfarris
- Created: 2017-05-19T20:22:56.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-19T20:24:27.000Z (about 8 years ago)
- Last Synced: 2024-10-03T12:27:03.986Z (9 months ago)
- Topics: broccoli-plugin, browser-sync
- Language: JavaScript
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# broccoli-bs
Launch browser-sync and listen for changes.
## Installation
```
yarn add -D broccoli-bs
```## Usage
Give broccoli-bs a list of nodes to watch. When anything changes,
broccoli-bs will tell browser-sync to reload the browsers. If the
only change is a CSS file, browser-sync will inject the new CSS live!You may also provide options to the plugin. The `bs` option will be
passed on to browser-sync. See [browser-sync options](https://www.browsersync.io/docs/options).### Example
```js
// Brocfile.jsconst BrowserSync = require('broccoli-bs');
const merge = require('broccoli-merge-trees');// ...
const assets = merge([ imgTree, jsTree, cssTree ]);
const browserSync = new BrowserSync(assets, {
bs: {
proxy: 'http://localhost:4000', // maybe you have a Phoenix server running?
open: false // maybe you don't want browser to open automatically?
}
});module.exports = merge([ assets, browserSync ]);
```## License
MIT