velocity-ci
Advanced tools
Comparing version 0.0.3 to 0.0.4
{ | ||
"name": "velocity-ci", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Commnad line runner until we can use `meteor test`", | ||
@@ -15,6 +15,7 @@ "main": "index.js", | ||
"dependencies": { | ||
"commander": "^2.2.0", | ||
"ddp": "^0.7.0", | ||
"phantomjs": "^1.9.7-12" | ||
"minimist": "^0.2.0", | ||
"phantomjs": "^1.9.7-12", | ||
"ps-tree": "0.0.3" | ||
} | ||
} |
@@ -6,3 +6,3 @@ velocity-cli | ||
## Installation | ||
`npm install -g velocity-cli` | ||
`npm install -g velocity-ci` | ||
@@ -9,0 +9,0 @@ ## Run |
@@ -8,4 +8,5 @@ #!/usr/bin/env node | ||
var DDPClient = require("ddp"); | ||
var argv = require('minimist')(process.argv.slice(2)); | ||
var psTree = require('ps-tree'); | ||
function projectRoot(directory){ | ||
@@ -47,3 +48,3 @@ //go up the directory tree until we see a .meteor folder | ||
host: "localhost", | ||
port: 3000, | ||
port: argv.port || 3000, | ||
/* optional: */ | ||
@@ -107,3 +108,11 @@ auto_reconnect: true, | ||
if (isFinished){ | ||
meteor.kill("SIGTERM"); | ||
psTree(meteor.pid, function(err, children) { | ||
var pids = []; | ||
for(var i = 0; i < children.length; i++) { | ||
var el = children[i]; | ||
pids.push(el.PID); | ||
} | ||
childProcess.exec('kill ' + meteor.pid); | ||
childProcess.exec('kill ' + pids.join(" ")); | ||
}); | ||
setTimeout(function(){ | ||
@@ -110,0 +119,0 @@ if (finalResult == "passed"){ |
7847
190
4
+ Addedminimist@^0.2.0
+ Addedps-tree@0.0.3
+ Addedevent-stream@0.5.3(transitive)
+ Addedminimist@0.2.4(transitive)
+ Addedoptimist@0.2.8(transitive)
+ Addedps-tree@0.0.3(transitive)
+ Addedwordwrap@0.0.3(transitive)
- Removedcommander@^2.2.0