0.1.15 • Published 10 years ago

lr v0.1.15

Weekly downloads
9
License
MIT
Repository
github
Last release
10 years ago

lr

A CLI for livereload.

Installation

npm install -g lr

Features

  • reload static assets without refreshing
  • watch files and directories, triggering tasks on changes
  • make-like configurations with .lr.yml
  • control task execution styles with configurable delimiters (see mute)

Usage

From --help:

Usage: lr [options] [path]:[command] ...

Options:

  -h, --help         output usage information
  -V, --version      output the version number
  -p, --port <port>  listen on port
  -m, --mute <char>  character to suppress reloading
  -f, --file <path>  path to configuration file
  -v, --verbose      more detailed log messages
  -s, --silent       suppress all log messages

Tasks

path

Watch the path and reload on changes. All watches are recursive.

Examples:

$ lr            # this is the same as passing `.`
$ lr foo bar    # pass as many paths as you like
$ lr foo/*.js   # globs are resolved

path:command

If given a command, lr will execute it before reloading. This is particularly useful for builds.

Examples:

$ lr baz:make   # when baz changes, make, then reload

path:[mutecommand]

Mute commands are prefixed by the mute delimiter, @, by default.

A mute command does not trigger a reload. This is handy for builds with multiple compile steps. For instance, you may want to compile your stylus files quietly, instead waiting for changes in build before reloading.

Examples:

$ lr public/*/*.styl:'@make stylus' build  # compile CSS when necessary, but only reload for changes in build

Todo

  • tests
  • docs on config files

License

MIT

0.1.15

10 years ago

0.1.14

10 years ago

0.1.13

10 years ago

0.1.12

10 years ago

0.1.11

10 years ago

0.1.10

10 years ago

0.1.9

10 years ago

0.1.8

10 years ago

0.1.7

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago