Skip to content

Commit

Permalink
fix #1482
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewTsao committed Jun 7, 2014
1 parent fd87d9d commit 6a9538e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bin/jade.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,20 @@ var files = program.args;

if (files.length) {
console.log();
files.forEach(renderFile);
if (options.watch) {
// keep watching when error occured.
process.on('uncaughtException', function(err) {
console.error(err);
});
files.forEach(renderFile);
monocle.watchFiles({
files: files,
listener: function(file) {
renderFile(file.absolutePath);
}
});
} else {
files.forEach(renderFile);
}
process.on('exit', function () {
console.log();
Expand Down

0 comments on commit 6a9538e

Please sign in to comment.