@kilt/watchdir
v0.1.13
Published
Single directory files change watcher
Downloads
9
Readme
@kilt/watchdir
Install
npm i -D @kilt/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 '@kilt/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) )