Skip to content

Commit 64a5db7

Browse files
committed
update dependencies and README for release
1 parent f299849 commit 64a5db7

File tree

3 files changed

+1084
-42
lines changed

3 files changed

+1084
-42
lines changed

README.md

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ The commandline options are
6565
* `-x` or `--exclusions` to specify additional exclusion patterns. Example: `-x html, images/`.
6666
* `-u` or `--usepolling` to poll for file system changes. Set this to true to successfully watch files over a network.
6767
* `-w` or `--wait` to add a delay (in miliseconds) between when livereload detects a change to the filesystem and when it notifies the browser.
68+
* `-op` or `--originalpath` to set a URL you use for development, e.g 'http:/domain.com', then LiveReload will proxy this url to local path.
6869

6970
For example, to use a wait time and turn on debugging so you can see messages in your terminal, execute `livereload` like this:
7071

@@ -84,6 +85,13 @@ The file path can be at any place in the arguments. For example, you can put it
8485
$ livereload -e 'html' public/
8586
```
8687

88+
Finally, you can tell LiveReload to refresh the browser when specific filenames change. This is useful when there are files that don't have extensions, or when you want to exclude all HTML files except for `index.html` throughout the project. Use the `-f` or `--filesToReload` option:
89+
90+
```sh
91+
$ livereload -f 'index.html' public/
92+
```
93+
94+
All changes to `index.html` in any subdirectory will cause LiveReload to send the reload message.
8795

8896
## Option 2: From within your own project
8997

@@ -188,33 +196,52 @@ server.watch('/User/Workspace/test');
188196

189197
Then run the server:
190198

191-
`$ node server.js`
192-
199+
```sh
200+
$ node server.js
201+
```
193202

194203
When `/User/Workspace/test/css/style.css` is modified, the stylesheet will be reloaded on the page.
195204

205+
# Troubleshooting
206+
207+
## The browser extension doesn't connect.
208+
209+
If you're using `file:///` urls, make sure the browser extension is configured to access local files. Alternatively, embed the `livereload.js` script on your page as shown in this README.
210+
211+
## When I change the HTML page I'm working on, the browser refreshes and tells me the file isn't found.
212+
213+
Your editor is most likely using a swapfile, and when you save, there's a split second where the existing file is deleted from the file system before the swap file is saved in its place. This happens with Vim. You can disable swapfiles in your editor, or you can add a slight delay to Livereload using the `-w` option on the command line.
214+
215+
216+
196217
# Developing livereload
197218

198-
This library is implemented in CoffeeScript 1.x. It may eventually be converted to JavaScript, but
199-
because there are many projects that depend on this library, the conversion isn't a priority.
219+
This library is implemented in CoffeeScript 1.x. It may eventually be converted to JavaScript, but because there are many projects that depend on this library, the conversion isn't a priority.
200220

201221
To build the distributable versions, run `npm run build`.
202222

203223
Run `npm test` to run the test suite.
204224

205225
# Contributing
206226

207-
Contributions welcome, but remember that this library is meant to be small and serve its intended purpose only. Before submitting a pull request, open a new issue to discuss your feature or bug. Please
208-
check all open and closed issues.
227+
Contributions welcome, but remember that this library is meant to be small and serve its intended purpose only. Before submitting a pull request, open a new issue to discuss your feature or bug. Please check all open and closed issues.
209228

210-
When submitting code, please keep commits small, and do not modify the README file. Commit both the Coffee and JS files.
229+
When submitting code, please keep commits small, and do not modify the README file. Commit both the Coffee and JS files.
211230

212231
# Changelog
213232

214233
### 0.9.2
234+
* Server: Added `filesToReload` option to specify a list of filenames that should trigger the reload, rather than relying on extensions alone.
235+
* CLI: You can use the `-f` or `--filesToReload` option with the command line tool to specifiy filenames that should trigger a reload.
215236
* CLI: The file path is no longer fixed to a specific position in the arguments list
216237
* CLI: You no longer need to specify the file path when using additional arguments
217238
* CLI: You can use the `-op` or `--originalpath` option with the command line tool instead of writing your own server.
239+
* CLI: The help screen displays more accurate option descriptions.
240+
* Tests: Added more specific tests to ensure that refresh is called in various scenarios.
241+
* Other: Removed `Cakefile` as Cake is no longer needed. Use `npm run tests` and `npm run build` instead.
242+
* Dependencies: Updated `chokidar` dependency to 3.5.1
243+
* Dependencies: Updated `livereload-js` dependency to 3.3.1
244+
* Dependencies: Updated `ws` dependency to 7.4.3
218245

219246
### 0.9.1
220247
* Fix issue with livereload.js not resolving properly on some projects (caseywebdev)
@@ -274,7 +301,7 @@ When submitting code, please keep commits small, and do not modify the README fi
274301

275302
### 0.4.1
276303
* Remove some bad JS code
277-
*
304+
278305
### 0.4.0
279306
* Rewritten using Chokidar library and `ws` library
280307
* Added `usePolling` option
@@ -284,6 +311,6 @@ Older version history not kept.
284311

285312
# License
286313

287-
Copyright (c) 2010-2019 Brian P. Hogan and Joshua Peek
314+
Copyright (c) 2010-2021 Brian P. Hogan and Joshua Peek
288315

289316
Released under the MIT license. See `LICENSE` for details.

0 commit comments

Comments
 (0)