JSPM

browser-refresh-client

1.1.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 11448
  • Score
    100M100P100Q123187F
  • License MIT

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

Package Exports

  • browser-refresh-client

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (browser-refresh-client) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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