Created
February 8, 2017 03:36
-
-
Save juliandavidmr/d6c24611a6fb0b33e78ac1f05e7d4ac2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
'use strict'; | |
var meow = require('meow'); | |
var catNames = require('./'); | |
var cli = meow([ | |
'Examples', | |
' $ cat-names', | |
' Max', | |
'', | |
' $ cat-names --all', | |
' Abby', | |
' Angel', | |
' ...', | |
'', | |
'Options', | |
' --all Get all names instead of a random name' | |
]); | |
console.log(cli.flags.all ? catNames.all.join('\n') : catNames.random()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment