Skip to content

Commit

Permalink
Adding simple usage example.
Browse files Browse the repository at this point in the history
  • Loading branch information
arboleya committed Dec 10, 2012
1 parent 3911cd0 commit a822cf1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/basic/src/a.coffee
@@ -0,0 +1 @@
console.log "a"
1 change: 1 addition & 0 deletions examples/basic/src/b.coffee
@@ -0,0 +1 @@
console.log "b"
1 change: 1 addition & 0 deletions examples/basic/src/c.coffee
@@ -0,0 +1 @@
console.log "c"
8 changes: 8 additions & 0 deletions examples/basic/watch_tree.coffee
@@ -0,0 +1,8 @@
fsu = require '../../lib/fs-util'
watcher = fsu.watch 'src', /.coffee$/m, true

watcher.on 'watch', (f)-> console.log 'WATCHED ' + [f.type, f.location]
watcher.on 'unwatch', (f)-> console.log 'UNWATCHED ' + [f.type, f.location]
watcher.on 'create', (f)-> console.log 'CREATED ' + [f.type, f.location]
watcher.on 'change', (f)-> console.log 'CHANGED ' + [f.type, f.location]
watcher.on 'delete', (f)-> console.log 'DELETED ' + [f.type, f.location]

0 comments on commit a822cf1

Please sign in to comment.