# runwatch

> watch some files, run a command (when the files change)

Latest version **0.2.3** (published 2016-08-21) · BSD-3-Clause license · 0 weekly downloads

## Install

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

Provides the command `runwatch`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.3 |
| Published | 2016-08-21 |
| First published | 2016-04-27 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | elsehow |
| Maintainers | elsehow |
| Keywords | glob, watch, run, monitor |

## Links

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

## Dependencies (3)

- [gaze](https://npm.io/package/gaze.md) ^1.0.0
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [usage-and-quit](https://npm.io/package/usage-and-quit.md) 0.0.1

## Alternatives

- [@mce/gif](https://npm.io/package/@mce/gif.md) — 2.6K weekly downloads
- [cleanse](https://npm.io/package/cleanse.md) — 173 weekly downloads
- [str](https://npm.io/package/str.md) — 127 weekly downloads
- [naming](https://npm.io/package/naming.md) — 95 weekly downloads
- [tap-telco-api](https://npm.io/package/tap-telco-api.md) — 19 weekly downloads

## Recent versions

- 0.2.3 (latest) — 2016-08-21
- 0.2.2 — 2016-08-21
- 0.2.1 — 2016-08-21
- 0.2.0 — 2016-08-21
- 0.1.7 — 2016-08-19
- 0.1.6 — 2016-08-19
- 0.1.5 — 2016-08-01
- 0.1.4 — 2016-08-01
- 0.1.3 — 2016-05-02
- 0.1.2 — 2016-04-30
- 0.1.1 — 2016-04-29
- 0.1.0 — 2016-04-29
- 0.0.5 — 2016-04-28
- 0.0.4 — 2016-04-28
- 0.0.3 — 2016-04-27
- … 1 more at https://npm.io/package/runwatch/versions

## README

# runwatch

watches some files, runs a thing

## example
```
runwatch *.js -r "npm start" 
```

runs `npm start` and watches everything that matches `*.js*`.
when any `.js` file changes, it will SIGINT the old process (as if you pressed C-c), and re-runs `npm start`

## install

```
npm install -g runwatch
```
## example

```
echo "echo \"hello\"" > test.sh
runwatch test.sh -r "bash test.sh"
```

now modify test.sh, and watch the script re-run!

## about

heavily inspired by [npm-watch](https://www.npmjs.com/package/npm-watch), but with a few differences:

- runs from the command line, no npm dependencies
- uses [file globs](https://github.com/isaacs/node-glob) for advanaced filename matching
- when the watched script errors, it prints *only* the error, with no npm erroring boilerplate (!)
- no nodemon dependencies - just `child_process.spawn()`

## license

BSD

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