Skip to content

Instantly share code, notes, and snippets.

@tivac
Created September 17, 2013 07:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tivac/6591278 to your computer and use it in GitHub Desktop.
Save tivac/6591278 to your computer and use it in GitHub Desktop.
Example of a very simple file watcher task in dullard.
/*jshint node:true */
"use strict";
var Gaze = require("gaze").Gaze,
gaze;
// done is ignored
module.exports = function(config, done) {
gaze = new Gaze("**/*");
gaze.on("all", function(type, file) {
config.changed = file;
config.dullard.run("step", function(err) {
if(err) {
console.error(err);
}
});
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment