back to home

BrowserSync / browser-sync

Keep multiple browsers & devices in sync when building websites. https://browsersync.io

12,295 stars
756 forks
569 issues
JavaScriptTypeScriptHTML

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing BrowserSync/browser-sync in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind-ai.vercel.app/repo/BrowserSync/browser-sync)
Preview:Analyzed by RepoMind

Repository Summary (README)

Preview
<p align="center"> <a href="https://www.npmjs.com/package/browser-sync" title="NPM version"> <img src="https://img.shields.io/npm/v/browser-sync.svg?style=flat-square" /> </a> <a href="https://www.npmjs.com/package/browser-sync"> <img src="https://img.shields.io/npm/dm/browser-sync.svg?style=flat-square" /> </a> </p> <p align="center"><a href="https://www.browsersync.io"><img src="https://raw.githubusercontent.com/BrowserSync/browsersync.github.io/master/public/img/logo-gh.png" /></a></p> <p align="center">Keep multiple browsers & devices in sync when building websites.</p> <p align="center">Follow <a href="https://twitter.com/browsersync">@Browsersync</a> on twitter for news & updates.</p> <p align="center">Ask questions on <a href="https://discord.gg/2d2xUThp">Discord</a></p>

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