@francescozoccheddu/reload-please
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

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 or getClientScript() to inject the client code server-side, on the fly.

Build

Run:

npm run build

Package Sidebar

Install

npm i @francescozoccheddu/reload-please

Weekly Downloads

0

Version

0.0.3

License

MIT

Unpacked Size

10.1 kB

Total Files

15

Last publish

Collaborators

  • francescozoccheddu