npm.io
0.0.1 • Published 3 years ago

@w5/watch

Licence
Apache-2.0
Version
0.0.1
Deps
3
Size
2 kB
Vulns
0
Weekly
0

@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