From 53f9b36e84f5f3d72c98b94f3999ff73f5d96755 Mon Sep 17 00:00:00 2001 From: Shane Osbourne Date: Fri, 7 Jun 2019 09:32:16 +0100 Subject: [PATCH] docs: readme --- README.md | 2 +- .../lib/server/serve-static-wrapper.ts | 1 - packages/browser-sync/readme.md | 72 +++++++++++++++++++ 3 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 packages/browser-sync/readme.md diff --git a/README.md b/README.md index 34e6f51c1..bb33f696e 100644 --- a/README.md +++ b/README.md @@ -69,4 +69,4 @@ If you've found Browser-sync useful and would like to contribute to its continue Apache 2 -Copyright (c) 2016 Shane Osbourne +Copyright (c) 2019 Shane Osbourne diff --git a/packages/browser-sync/lib/server/serve-static-wrapper.ts b/packages/browser-sync/lib/server/serve-static-wrapper.ts index 40c011457..e4e9174bb 100644 --- a/packages/browser-sync/lib/server/serve-static-wrapper.ts +++ b/packages/browser-sync/lib/server/serve-static-wrapper.ts @@ -8,6 +8,5 @@ export default function() { const send = require("send"); send.mime.define({ "application/wasm": ["wasm"] }); - return serveStatic; } diff --git a/packages/browser-sync/readme.md b/packages/browser-sync/readme.md new file mode 100644 index 000000000..bb33f696e --- /dev/null +++ b/packages/browser-sync/readme.md @@ -0,0 +1,72 @@ +

+ + + + + + + +

+

+ + + + + + + + +

+

+

Keep multiple browsers & devices in sync when building websites.

+ +

Browsersync is developed and maintained internally at JH

+

Follow @Browsersync on twitter for news & updates.

+

Community

+ +## Features + +Please visit [browsersync.io](https://browsersync.io) for a full run-down of features + +## Requirements + +Browsersync works by injecting an asynchronous script tag (``) right after the `` tag +during initial request. In order for this to work properly the `` tag must be present. Alternatively you +can provide a custom rule for the snippet using [snippetOptions](https://www.browsersync.io/docs/options/#option-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... + +```js +browserSync({server: true}, function(err, bs) { + console.log(bs.options.urls.local); +}); +``` + +... you now access them in the following way: + +```js +browserSync({server: true}, function(err, bs) { + console.log(bs.options.getIn(["urls", "local"])); +}); +``` + +## Install and trouble shooting + +[browsersync.io docs](https://browsersync.io) + +## Integrations / recipes + +[Browsersync recipes](https://github.com/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](https://rawgithub.com/chris---/Donation-Badges/master/paypal.jpeg)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=shakyshane%40gmail%2ecom&lc=US&item_name=browser%2dsync) + + +Apache 2 +Copyright (c) 2019 Shane Osbourne