From 5661be084aa917e17729b5388aa3bb88286ae011 Mon Sep 17 00:00:00 2001 From: "Elf M. Sternberg" Date: Tue, 10 Jul 2012 11:23:14 -0700 Subject: [PATCH] Explicitly writing test results to a file. --- grunt.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/grunt.js b/grunt.js index ed84f79..0c9d54a 100644 --- a/grunt.js +++ b/grunt.js @@ -6,6 +6,7 @@ var path, _und, async; path = require('path'); _und = require('underscore'); async = require('async'); +fs = require('fs'); module.exports = function(grunt) { @@ -183,7 +184,7 @@ module.exports = function(grunt) { done(); return; } - console.log(result.stdout); + fs.appendFileSync('tmp/results.dot', result.stdout); done(); }); }); @@ -195,6 +196,8 @@ module.exports = function(grunt) { dest = grunt.config([this.name, 'dest']); sources.sort(); + grunt.file.mkdir('tmp'); + fs.writeFileSync('tmp/results.dot', ''); async.forEachSeries( sources, function(path, cb) {