Have ideas to improve npm?Join in the discussion! »

browser-refresh-client

1.1.4 • Public • Published

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...
    });

Install

npm i browser-refresh-client

DownloadsWeekly Downloads

7,118

Version

1.1.4

License

MIT

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar