@francescozoccheddu/reload-please
v0.0.3
Published
Lightweight server and client script to trigger a browser page reload
Downloads
4
Maintainers
Readme
reload-please
Lightweight server and client script to trigger a browser page reload.
Installation
Run:
npm i @francescozoccheddu/reload-please
Usage
Server
import { Server } from "@francescozoccheddu/reload-please";
const server = new Server();
server.start();
// [...]
server.reload();
// [...]
server.stop();
Client
import { Client } from "@francescozoccheddu/reload-please";
const client = new Client();
client.start();
// [...]
client.stop();
[!TIP] You can also use
server.clientScript
orgetClientScript()
to inject the client code server-side, on the fly.
Build
Run:
npm run build