Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gghez/cmd-watch
https://github.com/gghez/cmd-watch
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/gghez/cmd-watch
- Owner: gghez
- Created: 2015-04-20T16:42:03.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-04-20T18:28:25.000Z (over 9 years ago)
- Last Synced: 2024-10-31T17:52:07.179Z (about 2 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'
```