0.0.1 • Published 1 year ago

@w5/watch v0.0.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

@w5/watch

test/main.coffee :

#!/usr/bin/env coffee

> @w5/uridir
  @w5/watch > watchOnce
  path > join

ROOT = uridir import.meta

await watchOnce(
  join(ROOT,'.watch')
  ROOT
  (fp)=> # ignore
    not fp.endsWith '.coffee'
  (fp)=> # change
    console.log 'change', fp
    return
  (fp)=> # rm
    console.log 'rm ',fp
    return
)

output :

change main.coffee
0.0.1

1 year ago