Skip to content

Commit 3b1106a

Browse files
authored
refactor: update README.md (#75)
1 parent 78efa96 commit 3b1106a

File tree

1 file changed

+34
-35
lines changed

1 file changed

+34
-35
lines changed

README.md

Lines changed: 34 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
# ddev-browsersync <!-- omit in toc -->
1+
[![tests](https://github.com/ddev/ddev-browsersync/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/ddev/ddev-browsersync/actions/workflows/tests.yml?query=branch%3Amain)
2+
[![last commit](https://img.shields.io/github/last-commit/ddev/ddev-browsersync)](https://github.com/ddev/ddev-browsersync/commits)
3+
[![release](https://img.shields.io/github/v/release/ddev/ddev-browsersync)](https://github.com/ddev/ddev-browsersync/releases/latest)
24

3-
[![tests](https://github.com/ddev/ddev-browsersync/actions/workflows/tests.yml/badge.svg)](https://github.com/ddev/ddev-browsersync/actions/workflows/tests.yml) ![project is maintained](https://img.shields.io/maintenance/yes/2026.svg)
5+
# DDEV Browsersync <!-- omit in toc -->
46

5-
- [Introduction](#introduction)
6-
- [Getting Started](#getting-started)
7+
- [Overview](#overview)
8+
- [Installation](#installation)
9+
- [Usage](#usage)
710
- [Auto-start the watcher server](#auto-start-the-watcher-server)
811
- [What does this add-on do?](#what-does-this-add-on-do)
912
- [Integrations](#integrations)
@@ -14,9 +17,9 @@
1417
- [No Gateway / 502 error](#no-gateway--502-error)
1518
- [Unknown command "browsersync" for "ddev"](#unknown-command-browsersync-for-ddev)
1619
- [System limit for number of file watchers reached](#system-limit-for-number-of-file-watchers-reached)
17-
- [Contributing](#contributing)
20+
- [Credits](#credits)
1821

19-
## Introduction
22+
## Overview
2023

2124
[Browsersync](https://browsersync.io/) is free software that features:
2225

@@ -26,53 +29,49 @@
2629

2730
This add-on allows you to run [Browsersync](https://browsersync.io/) through the DDEV web service.
2831

29-
## Getting Started
32+
## Installation
3033

31-
1. Install the DDEV Browsersync add-on:
34+
To install this add-on, run:
3235

33-
```sh
36+
```bash
3437
ddev add-on get ddev/ddev-browsersync
38+
ddev restart
3539
```
3640

37-
For earlier versions of DDEV run
41+
After installation, make sure to commit the `.ddev` directory to version control.
3842

39-
```sh
40-
ddev get ddev/ddev-browsersync
41-
```
43+
## Usage
4244

43-
1. Use the custom command, `ddev browsersync`, to start the watcher
45+
| Command | Description |
46+
| ------- | ----------- |
47+
| `ddev browsersync` | Start the watcher |
48+
| `ddev launch :3000` | Launch the Browsersync page |
4449

45-
```shell
50+
Examples:
51+
52+
```bash
4653
$ ddev browsersync
47-
Proxying browsersync on https://mysite.ddev.site:3000
54+
Proxying Browsersync on https://mysite.ddev.site:3000
4855
[Browsersync] Proxying: http://localhost
4956
[Browsersync] Watching files...
50-
```
51-
52-
1. Launch the Browsersync page, via the `Proxying browsersync` URL shown in your terminal or `ddev launch :3000`
5357

54-
```shell
55-
ddev launch :3000
58+
$ ddev launch :3000
59+
# The site should briefly display "Browsersync: connect"
60+
# in the top right corner, confirming it is connect to the server.
5661
```
5762

58-
The site should briefly display "Browsersync: connect" in the top right corner, confirming it is connect to the server.
59-
6063
### Auto-start the watcher server
6164

6265
You can use DDEV's `post-start` hook to start the watcher server and launch the page when DDEV starts.
6366

64-
1. Create a `.ddev/config.browsersync-extras.yaml`
65-
66-
```yml
67+
```bash
68+
cat <<'EOF' > .ddev/config.browsersync-extras.yaml
6769
hooks:
68-
post-start:
69-
- exec-host: bash -c "ddev browsersync &"
70-
- exec-host: ddev launch :3000
71-
```
72-
73-
1. Restart DDEV to apply the changes.
70+
post-start:
71+
- exec-host: bash -c "ddev browsersync &"
72+
- exec-host: ddev launch :3000
73+
EOF
7474

75-
```shell
7675
ddev restart
7776
```
7877

@@ -211,8 +210,8 @@ You either have to decrease the number of files you’re watching or increase th
211210

212211
- On Linux, you can change `fs.inotify.max_user_watches` on the host in `/etc/sysctl.d/local.conf` or elsewhere.
213212

214-
## Contributing
213+
## Credits
215214

216215
PRs for install steps for specific frameworks are welcome.
217216

218-
**Contributed and maintained by [tyler36](https://github.com/tyler36)**
217+
**Contributed and maintained by [@tyler36](https://github.com/tyler36)**

0 commit comments

Comments
 (0)