https://github.com/gghez/cmd-watch
https://github.com/gghez/cmd-watch
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/gghez/cmd-watch
- Owner: gghez
- Created: 2015-04-20T16:42:03.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-04-20T18:28:25.000Z (about 10 years ago)
- Last Synced: 2025-02-18T22:38:14.764Z (5 months ago)
- Language: JavaScript
- Size: 141 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cmd-watch
Command line tool to run a specific command whenever the file system changes on a targetted path.
Useful on a server to watch deployed files update and execute a kind of `npm install`.
## Installation
```
npm install -g cmd-watch
```## Usage
```
Usage: node index.js-d, --target=ARG Path to file or directory to watch
-r, --retention=ARG Retention (in ms.) before command (default: 1000ms)
-c, --command=ARG Command to execute after retention
--help Display this help
```Watch current directory and execute `npm install` on file system changes:
```
cmd-watch --command 'npm install'
```