Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Windows work-around #31

Merged
merged 2 commits into from

3 participants

@tomgasson

Whilst Node core fixes the root problem, here's a workaround for windows that buffers the output manually. Not tested in linux/mac but should work.

tomgasson added some commits
@tomgasson tomgasson 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
254daa1
@tomgasson tomgasson 1 global per line
print one global per line to help step through them
31f110f
@captainclam

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

@uipoet uipoet merged commit 832d8d5 into uipoet:master
@uipoet
Owner

Sorry, this slipped right by me. Thanks for the work-around!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 16, 2012
  1. @tomgasson

    windows workaround for #23

    tomgasson authored
    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
  2. @tomgasson

    1 global per line

    tomgasson authored
    print one global per line to help step through them
This page is out of date. Refresh to see the latest.
Showing with 12 additions and 3 deletions.
  1. +1 −1  JSHint.sublime-build
  2. +11 −2 reporter.js
View
2  JSHint.sublime-build
@@ -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
13 reporter.js
@@ -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) {
@@ -60,7 +65,9 @@ module.exports = {
if (globals) {
globals.forEach(function (global) {
- console.log(numberWang(global.line.toString().length + 1), global.line + ',1: \'' + global.name + '\' is an implied global variable.');
+ for (var line in global.line){
+ console.log(numberWang(global.line[line].toString().length + 1), global.line[line] + ',1: \'' + global.name + '\' is an implied global variable.');
+ }
});
}
@@ -70,5 +77,7 @@ module.exports = {
});
}
}
+ process.stdout.write(buffer);
+ setTimeout('',3000);
}
};
Something went wrong with that request. Please try again.