# livery

> Minimal development server to watch and dispense static files.

Latest version **4.0.3** (published 2024-11-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install livery
pnpm add livery
yarn add livery
bun add livery
```

Provides the commands `lr`, `livery`.

## Health

**Score 30/100 (F)** — status: maintenance-mode.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.3 |
| Published | 2024-11-18 |
| First published | 2018-04-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=12.17.0 |
| Dependencies | 4 |
| Unpacked size | 7.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Shannon Moeller |
| Maintainers | shannonmoeller |
| Keywords | cli, dev, live, livereload, lr, reload, server |

## Links

- npm: https://www.npmjs.com/package/livery
- Repository: https://github.com/shannonmoeller/livery
- Homepage: https://github.com/shannonmoeller/livery#readme
- Issues: https://github.com/shannonmoeller/livery/issues
- npm.io page: https://npm.io/package/livery

## Dependencies (4)

- [send](https://npm.io/package/send.md) ^1.1.0
- [tiny-lr](https://npm.io/package/tiny-lr.md) ^2.0.0
- [chokidar](https://npm.io/package/chokidar.md) ^4.0.1
- [minimist](https://npm.io/package/minimist.md) ^1.2.8

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 4.0.3 (latest) — 2024-11-18
- 3.1.0-1 (canary) — 2020-10-10
- 4.0.2 — 2022-07-07
- 4.0.1 — 2022-05-17
- 4.0.0 — 2020-10-11
- 3.3.0 — 2020-10-10
- 3.2.1 — 2020-10-10
- 3.2.0 — 2020-10-10
- 3.1.1 — 2020-10-10
- 3.1.0 — 2020-10-10
- 3.1.0-0 — 2020-10-10
- 3.0.0 — 2020-10-10
- 2.2.0 — 2018-06-05
- 2.1.0 — 2018-06-05
- 2.0.1 — 2018-06-05
- … 8 more at https://npm.io/package/livery/versions

## README

# livery ⟳

[![NPM version][npm-img]][npm-url] [![Downloads][downloads-img]][npm-url]

Minimal development server to watch and dispense static files.

## Install

Install the [LiveReload](http://livereload.com/extensions/) browser extensions.

```command
$ npm install --global livery
```

## Usage

```man
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.

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

----

MIT © [Shannon Moeller](http://shannonmoeller.com)

[downloads-img]: http://img.shields.io/npm/dm/livery.svg?style=flat-square
[npm-img]:       http://img.shields.io/npm/v/livery.svg?style=flat-square
[npm-url]:       https://npmjs.org/package/livery

---
_Source: https://npm.io/package/livery · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
