Skip to content

Commit

Permalink
Printing version with -v.
Browse files Browse the repository at this point in the history
  • Loading branch information
augustl committed Feb 11, 2012
1 parent 55e1e3f commit d85f709
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bin/buster
Expand Up @@ -7,6 +7,8 @@ var argv = Array.prototype.slice.call(process.argv).slice(2)

if (argv.length == 0 || argv[0] == "--help" || argv[0] == "-h") {
printHelp();
} else if (argv[0] == "--version" || argv[0] == "-v") {
printVersions();
} else {
var cmd = argv.shift();
if (/^\-/.test(cmd)) {
Expand All @@ -17,7 +19,7 @@ if (argv.length == 0 || argv[0] == "--help" || argv[0] == "-h") {
}

function printHelp() {
console.log("Usage: buster <command> [args]");
console.log("Usage: buster [--version,-v] <command> [<args>]");
console.log();
console.log("The most commonly used Buster.JS commands are:");
console.log(" test Run tests with Buster.JS");
Expand All @@ -26,6 +28,10 @@ function printHelp() {
console.log(" static An alternative static HTML page based runner");
}

function printVersions() {
console.log("Buster.JS version 0.3 beta1");
}

function runBusterCmd() {
childProcess.exec(
"command -v buster-" + cmd,
Expand Down

0 comments on commit d85f709

Please sign in to comment.