# vigil

> Simple, efficient file watching.

Latest version **0.7.3** (published 2017-03-02) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.7.3 |
| Published | 2017-03-02 |
| First published | 2013-11-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Zach Kelling |
| Maintainers | zeekay |

## Links

- npm: https://www.npmjs.com/package/vigil
- Repository: https://github.com/zeekay/vigil
- Homepage: http://github.com/zeekay/vigil
- Issues: http://github.com/zeekay/vigil/issues
- npm.io page: https://npm.io/package/vigil

## Dependencies (1)

- [to-regexp](https://npm.io/package/to-regexp.md) 0.1.7

## Recent versions

- 0.7.3 (latest) — 2017-03-02
- 0.7.2 — 2017-03-02
- 0.7.1 — 2017-03-02
- 0.7.0 — 2017-03-02
- 0.6.1 — 2016-11-03
- 0.6.0 — 2016-11-03
- 0.5.7 — 2015-11-19
- 0.5.6 — 2015-11-19
- 0.5.5 — 2015-11-19
- 0.5.4 — 2015-11-19
- 0.5.3 — 2015-11-19
- 0.5.2 — 2015-11-19
- 0.5.1 — 2015-11-19
- 0.5.0 — 2015-11-19
- 0.4.0 — 2015-09-02
- … 21 more at https://npm.io/package/vigil/versions

## README

# vigil [![Build Status](https://travis-ci.org/zeekay/vigil.svg?branch=master)](https://travis-ci.org/zeekay/vigil) [![npm version](https://badge.fury.io/js/vigil.svg)](https://badge.fury.io/js/vigil)

Simple, fast, efficient file watcher for node.

### Example
```javascript
vigil.watch('src/*.coffee', function(filename, stats) {
    exec('coffee -bcm ' + filename)
})
```

### API
#### vigil.run(fn, cb)
Executes `fn` (typically a server), watching modules required into VM for
changes and executing `cb` on change events.

#### vigil.vm(cb)
Watches modules required into VM for changes, executing `cb` on change events

#### vigil.walk(path, cb)
Walks `path`, calling `cb` with `(filename,
stats)` for each file found (optionally matching glob pattern).

#### vigil.watch(path, cb)
Watches `path` for changes, calling `cb` with `(filename, stats, isModule)` on
change.

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