Live reload dev tool for the Hypothesis client
This implements support and a test environment in which the Hypothesis client can live reload when scripts, styles etc. are changed. Live reloading when scripts change currently requires support from the hosting page. There are two parts to this: - A server which serves test pages with the Hypothesis client embedded and notifies it when front-end assets (styles, scripts) are changed. Test pages are served at http://localhost:3000/<any path> by default. - A small client script which connects to the server and listens for notifications of asset changes. When styles change it will reload styles for the page. When scripts or Angular templates change it will send a request to the top-level page to reload. This enables reloading to work when changing both the sidebar app and Annotator code but also avoids the need to manually unload the existing Annotator instance before reloading.
Showing
... | @@ -83,7 +83,8 @@ | ... | @@ -83,7 +83,8 @@ |
"proxyquire-universal": "^1.0.8", | "proxyquire-universal": "^1.0.8", | ||
"proxyquireify": "^3.0.0", | "proxyquireify": "^3.0.0", | ||
"request": "^2.69.0", | "request": "^2.69.0", | ||
"sinon": "1.16.1" | "sinon": "1.16.1", | ||
"websocket": "^1.0.22" | |||
}, | }, | ||
"engines": { | "engines": { | ||
"node": "0.10.x" | "node": "0.10.x" | ||
... | ... |
Please register or sign in to comment