Skip to content

francescozoccheddu/reload-please

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published