From 167f58b02991d9b9d23b99846bcf223eeec602aa Mon Sep 17 00:00:00 2001 From: "Alexander J. Lallier" Date: Sun, 5 Jun 2016 14:07:35 -0400 Subject: [PATCH] 0.8.1 0.8.1 --- CHANGELOG.md | 4 ++++ README.md | 10 ++++++++++ package.json | 5 ++++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 483b423..12b9eae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +0.8.1 / 2016-06-05 +------------------ +- Allow reload from node server. See: https://github.com/jprichardson/reload/pull/38 + 0.8.0 / 2015-12-21 ------------------ - fixed `hostname` flag. See: https://github.com/jprichardson/reload/pull/34 diff --git a/README.md b/README.md index 56cdb49..d069272 100644 --- a/README.md +++ b/README.md @@ -177,7 +177,17 @@ How does it work? It's actually stupidly simple. We leverage `supervisor` to restart the server if any file changes. The client side keeps a websocket open, once the websocket closes, the client sets a timeout to reload in approximately 300 ms (or any other time you'd like, refer to [API](https://github.com/jprichardson/reload#api) below). Simple huh? +Reload on your terms +--- +If you would like to fire the reload event on your own terms you can use fire a reload event by calling `reload()` yourself. An example is shown below: +``` +reloadServer = reload(server, app, 1000); +watch.watchTree(__dirname + "/public", function (f, curr, prev) { + console.log("Trying to reload..."); + reloadServer.reload(); +}); +``` API --- diff --git a/package.json b/package.json index 2f709ea..19c0369 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "reload", - "version": "0.8.0", + "version": "0.8.1", "description": "Node.js module to refresh and reload your code in your browser when your code changes. No browser plugins required.", "repository": { "type": "git", @@ -14,6 +14,9 @@ "development" ], "author": "JP Richardson ", + "contributors": [ + "Alexander J. Lallier " + ], "license": "MIT", "dependencies": { "sockjs": "~0.3.5",