browser-refresh-client

Small module to interface with the parent browser-refresh process to control reloading of files.

MIT 6 个版本
安装
npm install browser-refresh-client
yarn add browser-refresh-client
pnpm add browser-refresh-client
bun add browser-refresh-client
README

browser-refresh-client

Small module that allows the current child process launched by browser-refresh to control the parent browser-refresh process. If the process was not launched by the browser-refresh launcher then operations will be a no-op.

Installation

npm install browser-refresh-client --save

Usage

Check if the current process was launched using browser-refresh

require('browser-refresh-client').isBrowserRefreshEnabled();

Enable special reloading of files

require('browser-refresh-client')
    .enableSpecialReload('*.foo *.bar')
    .onFileModified(function(path) {
        // Handle the modification of either a *.foo file or
        // a *.bar file...
    });
版本列表
1.1.4 2015-09-11
1.1.3 2015-09-11
1.1.2 2015-09-10
1.1.1 2015-06-10
1.1.0 2015-03-17
1.0.0 2014-12-11