Skip to content

CLI to reload browsers when files change with LiveReload.

License

Notifications You must be signed in to change notification settings

asraeldragon/livery

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

livery ⟳

NPM version Downloads

Minimal development server to watch and dispense static files.

Install

Install the LiveReload browser extensions.

$ npm install --global livery

Usage

Usage: livery [<options>] [--] [<dir>]
       lr [<options>] [--] [<dir>]

Options:
  -d, --delay    Debounce delay for reloads. (default: 250)
  -h, --help     Output usage information.
  -l, --live     LiveReload server port. (default: 35729)
  -p, --port     HTTP server port. (default: 3000)
  -s, --spa      Single-page app. If string, path to html. (default: false)
  -w, --watch    Glob or globs of files to watch. (default: '**/*.*')

Examples:
  $ lr
  $ lr -p 8080 public
  $ livery --watch 'src/**/*.*' --watch 'test/**/*.js' dist
  $ livery --spa -- static
  $ livery --spa app.html

API

livery([dir, [options]]): Object

  • dir {String} Directory of static files. (default: .)
  • options {Object}
    • delay {Number} Debounce delay for reloads. (default: 250)
    • httpPort {Number} HTTP server port. (default: 3000)
    • livePort {Number} LiveReload server port. (default: 35729)
    • spa {Boolean|String} Single-page app. If string, path to html. (default: false).
    • watch {String|Array} Glob or globs of files to watch. (default: **/*.*)

Starts an HTTP server, LiveReload server, and file watcher.

const livery = require('livery');
const { httpServer, liveServer, fileWatcher } = livery({
    delay: 250,
    httpPort: 3000,
    livePort: 35729,
    spa: false,
    watch: '**/*.*',
});

MIT © Shannon Moeller

About

CLI to reload browsers when files change with LiveReload.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 91.8%
  • HTML 8.2%