Nickelback Plays Music

    watch-dependency-graph
    TypeScript icon, indicating that this package has built-in type declarations

    3.0.1 • Public • Published

    watch-dependency-graph

    npm version test coverage npm bundle size

    A small Node.js file watcher that watches dependency trees instead of globs or directories.

    import { create } from 'watch-dependency-graph'
    
    const files = [path.resolve(__dirname, './my-file.js')]
    
    const watcher = create()
    
    watcher.on('change', (files) => {}) // string[]
    watcher.on('remove', (files) => {}) // string[]
    watcher.on('error', (error) => {}) // string[]
    
    watcher.add(files) // string or string[], must be absolute
    watcher.remove(files) // string or string[], must be absolute
    
    const removeListener = watcher.on('change', (files) => {})
    removeListener()

    License

    MIT License © Sure Thing

    Install

    npm i watch-dependency-graph

    DownloadsWeekly Downloads

    20

    Version

    3.0.1

    License

    MIT

    Unpacked Size

    186 kB

    Total Files

    17

    Last publish

    Collaborators

    • estrattonbailey