Skip to content

A simple file watcher for Node that supports globbing within a tree.

License

Notifications You must be signed in to change notification settings

rivierapartners/mononoke

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mononoke

mononoke is a simple library that can be used with tools such as gulp that allows you to watch a directory recursively for any changes. You assign a callback which takes a filename as a single parameter, which is applied to all the changed files. You can also specify globbing patterns within each tree, to ensure only the selected files are returned.

Usage

For simple file watching to monitor all files in a directory: npm install mononoke

var mononoke = require('mononoke');

gulp.task('minify', function() {
    mononoke.watch(dir)
      .created(function(f) {
        gulp.src(f)
          .pipe()
        })
      .modified(function(f) {
        gulp.src(f)
          .pipe()
        })

})

With globbing.

mononoke.watch(dir, ['*.css', '*.scss' ])
  .modified(function(f) {
    minify(f);
  }

About

A simple file watcher for Node that supports globbing within a tree.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published