Created
September 17, 2013 07:53
-
-
Save tivac/6591278 to your computer and use it in GitHub Desktop.
Example of a very simple file watcher task in dullard.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*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