Permalink
Browse files

windows workaround for #23

Only the first stdout message makes it to the build results, so we
buffer all the console.logs and print them at once with
process.stdout.write
  • Loading branch information...
tomgasson committed Jul 16, 2012
1 parent 845bb15 commit 254daa1c52c8844645dc1d49e3b569d74e16152e
Showing with 9 additions and 2 deletions.
  1. +1 −1 JSHint.sublime-build
  2. +8 −1 reporter.js
View
@@ -3,7 +3,7 @@
"cmd": ["jshint", "$file", "--reporter", "$packages/JSHint/reporter.js"],
- "file_regex": "file:\\s(.+)\\]",
+ "file_regex": "file:(.+)\\]",
"line_regex": "(\\d+),(\\d+)",
"osx": {
View
@@ -21,7 +21,12 @@ module.exports = {
return stayNumberWang;
}
-
+ var buffer = '';
+ console.log = function(){
+ var args = Array.prototype.slice.call(arguments);
+ buffer += args.join('');
+ buffer += '\n';
+ }
console.log('[JSHint file:', file + ']');
results.forEach(function (result) {
@@ -70,5 +75,7 @@ module.exports = {
});
}
}
+ process.stdout.write(buffer);
+ setTimeout('',3000);
}
};

1 comment on commit 254daa1

@simon-lang

This comment has been minimized.

Show comment Hide comment
@simon-lang

simon-lang Jul 24, 2012

Excellent - this fixes the problem for me, thank you!

Excellent - this fixes the problem for me, thank you!

Please sign in to comment.