browser-sync README

The project's README from github.com/BrowserSync/browser-sync. As one markdown file: README.md.

Keep multiple browsers & devices in sync when building websites.

Follow @Browsersync on twitter for news & updates.

Ask questions on Discord

Features

Please visit browsersync.io for a full run-down of features

Requirements

Browsersync works by injecting an asynchronous script tag (<script async>...</script>) right after the <body> tag during initial request. In order for this to work properly the <body> tag must be present. Alternatively you can provide a custom rule for the snippet using snippetOptions

Upgrading from 1.x to 2.x ?

Providing you haven't accessed any internal properties, everything will just work as there are no breaking changes to the public API. Internally however, we now use an immutable data structure for storing/retrieving options. So whereas before you could access urls like this...

browserSync({server: true}, function(err, bs) {
  console.log(bs.options.urls.local);
});

... you now access them in the following way:

browserSync({server: true}, function(err, bs) {
  console.log(bs.options.getIn(["urls", "local"]));
});

Install and trouble shooting

browsersync.io docs

Integrations / recipes

Browsersync recipes

Support

If you've found Browser-sync useful and would like to contribute to its continued development & support, please feel free to send a donation of any size - it would be greatly appreciated!

Support via PayPal

Supported by

Originally supported by JH - they provided financial support as well as access to a professional designer to help with Branding.

Apache 2 Copyright (c) 2021 Shane Osbourne

browser-sync (BrowserSync/browser-sync)

Searching Database…

What is this?BrowserSync is a developer tool that keeps multiple browsers and devices in sync while you build websites — actions in one browser are mirrored in the others as you work.
Is it a tool I run while developing, or a library I code against?Both sides exist: it ships as an npm package with a command-line interface, and it also exposes a public API that other code and integrations can build on.
How do I get it running on my machine?Install the npm package (npm install -g browser-sync), then follow the install and troubleshooting guide on browsersync.io for getting started.
Do I need Node.js or anything else installed first?Yes — it is distributed through npm as a JavaScript package, so Node.js and npm must be on your machine; installing also pulls its runtime dependencies such as rxjs.
I'm on 1.x — does upgrading to 2.x break anything?No, as long as you have not accessed internal properties: there are no breaking changes to the public API. Only the internal option storage changed, so urls are read differently.
How does BrowserSync get into my pages?It works through a snippet tag in your page — the tag must be present for syncing to work, and you can provide a custom rule for the snippet via snippetOptions if you need to.
Are there ready examples of integrating it with build tools?Yes — the README links to 'Browsersync recipes', a collection of ready-made integration examples for common setups.
Is it free to use, and how is development supported?It is free, released under the Apache 2.0 license. The author accepts donations of any size via PayPal to support continued development.
Size
14.5 MB
Stars
12.3K
Age
13y
Commits · 90 Days