@fsglob/watchdir
v0.0.2
Published
Single directory files change watcher
Downloads
2
Readme
@fsglob/watchdir
Install
npm i -D @fsglob/watchdir
Running CLI
npx watchdir -d ./src \
--when "{,**/}* ; {,**/}*.sass" "make js" \
--when "{,**/}*.sass" "make css" \
--run "echo 'all when detected has finished'"
JavaScript API
import WatchDir from '@fsglob/watchdir'
new WatchDir('./src')
.when('{,**/}* ; !{,**/}*.sass', () => console.log('js files changed') )
.when('{,**/}*.sass', () => console.log('sass files changed') )
.run( () => console.log('all when detected has finished) )