Skip to content

Commit

Permalink
use meow in the CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurvr committed May 21, 2015
1 parent d429a84 commit ebf5f7b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 22 deletions.
30 changes: 8 additions & 22 deletions cli.js
@@ -1,28 +1,14 @@
#!/usr/bin/env node
'use strict';
var pkg = require('./package.json');
var meow = require('meow');
var osName = require('./');
var argv = process.argv;

function help() {
console.log([
'',
' ' + pkg.description,
'',
' Example',
' os-name',
' OS X Mavericks'
].join('\n'));
}

if (argv.indexOf('--help') !== -1) {
help();
return;
}

if (argv.indexOf('--version') !== -1) {
console.log(pkg.version);
return;
}
meow({
help: [
'Example',
' os-name',
' OS X Mavericks'
].join('\n')
});

console.log(osName());
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -37,6 +37,7 @@
"linux"
],
"dependencies": {
"meow": "^3.1.0",
"osx-release": "^1.0.0",
"win-release": "^1.0.0"
},
Expand Down

0 comments on commit ebf5f7b

Please sign in to comment.