Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Log actual times of the file completions in case there is lag somewhere.

  • Loading branch information...
commit 5bc53b2bc72d902de7f60ed2dac207849a59f8e6 1 parent 58abfa0
Tim Caswell authored
Showing with 5 additions and 9 deletions.
  1. +3 −4 build.js
  2. +2 −5 builder.js
7 build.js
View
@@ -142,16 +142,15 @@ Combo.prototype = {
function render(data, next) {
var Helpers, haml;
var group = new Combo(function() {
- var args = Array.prototype.slice.call(arguments);
- next(args.map(function (arg) {
- return arg[0];
+ next("Done!\n" + Array.prototype.map.call(arguments, function (args) {
+ return args[0] + " - " + args[1];
}).join("\n"))
});
function write_file(filename, content) {
var cb = group.add();
File.write(filename, content).addCallback(function () {
- cb("Wrote " + content.length + " bytes to " + filename);
+ cb(new Date(), " Wrote " + content.length + " bytes to " + filename);
})
}
7 builder.js
View
@@ -5,10 +5,7 @@ process.mixin(require('sys'));
var PORT = 4242;
function log(message) {
- var date = new Date();
- message.split("\n").forEach(function (line) {
- puts(date + " - " + line);
- })
+ puts((new Date()) + " - " + message);
}
Http.createServer(function (req, res) {
@@ -47,7 +44,7 @@ function build(data, next) {
log("Rebuilding site");
Build.build(function (output) {
- log(output + "\nDone!");
+ log(output);
building = false;
next(output);
});
Please sign in to comment.
Something went wrong with that request. Please try again.