Comparing version 0.1.0 to 0.2.0
#!/usr/bin/env node | ||
/*jslint stupid: true*/ | ||
'use strict'; | ||
var driver = require('../lib/driver'); | ||
var fs = require('fs'); | ||
var options = require('../lib/options'); | ||
var options = { | ||
hostname : 'localhost', | ||
port : 4444, | ||
browsers : [{ | ||
name : 'chrome' | ||
}] | ||
}; | ||
if (fs.existsSync('.min-wd')) { | ||
var overrides = JSON.parse(fs.readFileSync('.min-wd').toString()); | ||
var k; | ||
for (k in overrides) { | ||
if (overrides.hasOwnProperty(k)) { | ||
options[k] = overrides[k]; | ||
} | ||
driver(process.stdin, options(), function (err) { | ||
if (err) { | ||
process.nextTick(function () { | ||
process.exit(1); | ||
}); | ||
} | ||
} | ||
driver(process.stdin, options).pipe(process.stdout); | ||
}).pipe(process.stdout); |
@@ -46,3 +46,3 @@ /* | ||
context.out.write('= ' + title + ' ' + line + '\n'); | ||
context.out.write(context.logs.join('').trimRight() + '\n'); | ||
context.out.write(context.logs.join('')); | ||
@@ -168,3 +168,3 @@ close(context, function () { | ||
module.exports = function (input, options) { | ||
module.exports = function (input, options, callback) { | ||
var out = through(); | ||
@@ -174,7 +174,3 @@ | ||
out.write(null); | ||
if (err) { | ||
process.nextTick(function () { | ||
process.exit(1); | ||
}); | ||
} | ||
callback(err); | ||
}); | ||
@@ -181,0 +177,0 @@ |
@@ -11,14 +11,8 @@ /* | ||
var through = require('through'); | ||
var insert = true; | ||
module.exports = function () { | ||
return through(function write(data) { | ||
if (insert) { | ||
this.queue('require("min-wd");'); | ||
insert = false; | ||
} | ||
this.queue('require("min-wd");'); | ||
this.queue(data); | ||
}, function end() { | ||
this.queue(null); | ||
}); | ||
}; |
{ | ||
"name" : "min-wd", | ||
"version" : "0.1.0", | ||
"version" : "0.2.0", | ||
"description" : "Minimal WebDriver that pipes stdin to browsers", | ||
@@ -5,0 +5,0 @@ "keywords" : ["webdriver", "stdin", "browser", "tests", "browserify", "browserify-transform"], |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10995
9
313