Skip to content

Commit

Permalink
switched to commander
Browse files Browse the repository at this point in the history
  • Loading branch information
SomeKittens committed Apr 25, 2014
1 parent dd7c3f3 commit ee4fc3a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
10 changes: 9 additions & 1 deletion bin/fizzbuzz
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@

'use strict';

var program = require('commander')
, version = require('../package.json').version;

program
.version(version)
.option('-n, --number', 'Number to count to', Number)
.parse(process.argv);

var buzzToFizz = 100
, arg = Number(process.argv[2]);
, arg = program.number;

if (arg) {
if(!isNaN(arg)) {
Expand Down
16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "interview",
"version": "0.0.4",
"description": "A series of command line tools for snarky answers to generic interview questions",
"description": "A collection of command line tools for snarky answers to generic interview questions",
"main": "bin/fizzbuzz",
"bin": {
"fizz": "bin/fizzbuzz",
Expand All @@ -13,18 +13,20 @@
},
"repository": {
"type": "git",
"url": "git://github.com/SomeKittens/FizzBuzz.git"
"url": "git://github.com/SomeKittens/Interview.git"
},
"keywords": [
"fizz",
"buzz",
"fizzbuzz",
"snark"
"snark",
"interview"
],
"author": "Randall Koutnik <[email protected]>",
"license": "MIT",
"bugs": {
"url": "https://github.com/SomeKittens/FizzBuzz/issues"
"url": "https://github.com/SomeKittens/Interview/issues"
},
"homepage": "https://github.com/SomeKittens/FizzBuzz"
"homepage": "https://github.com/SomeKittens/Interview",
"dependencies": {
"commander": "^2.2.0"
}
}

0 comments on commit ee4fc3a

Please sign in to comment.