Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/steel1990/watch
A file watch command line tool for run shell while file change
https://github.com/steel1990/watch
Last synced: about 2 months ago
JSON representation
A file watch command line tool for run shell while file change
- Host: GitHub
- URL: https://github.com/steel1990/watch
- Owner: steel1990
- Created: 2016-06-14T07:18:28.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-17T06:47:11.000Z (over 6 years ago)
- Last Synced: 2024-10-28T22:40:07.389Z (3 months ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
cli-watch is a cmd tool to run shell while files changed.
## Install
`npm i -g cli-watch`
## Usage
`watch -f a.js -r 'uglifyjs a.js -o b.js'`
This command will watch `a.js`, and run `uglifyjs a.js -o b.js` when it changed.
You can use glob patterns for the files param, such as:
`watch -f '*.js' -r 'uglifyjs ${p} -o ${n}.min.js'`
### Options
-h, --help output usage information
-V, --version output the version number
-f, --files [value] glob files pattern, use ; to separate multiple path
-r, --run [value] run command while files changed, you can use ${p} to instead of the changed file path, and use ${n} to instead of the name of changed file path without ext
-n, --dontRunWhileStart dont run the command while start watch