switching to 'Compiled' messages after the code has finished compiling on --watch ...

This commit is contained in:
Jeremy Ashkenas
2010-06-13 14:21:02 -04:00
parent 3bcca99cba
commit 4ecb1bb2ed
3 changed files with 11 additions and 10 deletions

View File

@@ -153,9 +153,6 @@
if (curr.mtime.getTime() === prev.mtime.getTime()) {
return null;
}
if (options.compile) {
puts(("Compiled " + source));
}
return fs.readFile(source, function(err, code) {
return compileScript(source, code.toString(), base);
});
@@ -172,7 +169,11 @@
dir = options.output ? path.join(options.output, baseDir) : srcDir;
jsPath = path.join(dir, filename);
compile = function() {
return fs.writeFile(jsPath, js);
return fs.writeFile(jsPath, js, function(err) {
if (options.compile && options.watch) {
return puts(("Compiled " + source));
}
});
};
return path.exists(dir, function(exists) {
if (exists) {

View File

@@ -255,7 +255,6 @@
return this;
}
this.expressions[idx] = last.makeReturn();
// unless last.containsPureStatement()
return this;
};
// An **Expressions** is the only node that can serve as the root.