awesome-job-dude
Advanced tools
Comparing version 0.1.2 to 0.2.0
51
index.js
@@ -6,19 +6,44 @@ #!/usr/bin/env node | ||
text = require('./text.json'), | ||
program = require('commander'), | ||
figlet = require('figlet'); | ||
var pjson = require('./package.json'); | ||
program | ||
.version(pjson.version) | ||
.option('-y, --ytmnd', 'You the man now dawg') | ||
.option('-k, --killinit', 'Killing it') | ||
.option('-a, --awesome', 'Awesome') | ||
.option('--hang', 'Hang In there') | ||
.option('-b, --beef', 'BEEF') | ||
.option('-o, --otmop', 'On The Might Of Princes') | ||
.option('-c, --crushit', 'Crushing it') | ||
.parse(process.argv); | ||
var finalText = randomFromList(text); | ||
figlet(finalText.text, function(err, data) { | ||
if (err) { | ||
console.log('Something went wrong...'); | ||
console.dir(err); | ||
return; | ||
} | ||
console.log(chalk.bgGreen(data)); | ||
}); | ||
var finalText = randomFromList(text); | ||
say.speak('Alex',finalText.voiceText); | ||
if (program.ytmnd) finalText = _.where(text, { 'key': "ytmnd" })[0]; | ||
if (program.awesome) finalText = _.where(text, { 'key': "awesome" })[0]; | ||
if (program.hang) finalText = _.where(text, { 'key': "hang" })[0]; | ||
if (program.killinit) finalText = _.where(text, { 'key': "killinit" })[0]; | ||
if (program.beef) finalText = _.where(text, { 'key': "beef" })[0]; | ||
if (program.otmop) finalText = _.where(text, { 'key': "otmop" })[0]; | ||
if (program.crushit) finalText = _.where(text, { 'key': "crushingit" })[0]; | ||
function randomFromList(list) { | ||
return list[_.random(list.length - 1)]; | ||
} | ||
execute(finalText); | ||
function execute(finalText) { | ||
figlet(finalText.text, function(err, data) { | ||
if (err) { | ||
console.log('Something went wrong...'); | ||
console.dir(err); | ||
return; | ||
} | ||
console.log(chalk.bgGreen(data)); | ||
}); | ||
say.speak('Alex',finalText.voiceText); | ||
} | ||
function randomFromList(list) { | ||
return list[_.random(list.length - 1)]; | ||
} |
{ | ||
"name": "awesome-job-dude", | ||
"version": "0.1.2", | ||
"description": "awesome-job-dude ================", | ||
"version": "0.2.0", | ||
"description": "a high five from your command line", | ||
"main": "index.js", | ||
@@ -24,2 +24,3 @@ "scripts": { | ||
"chalk": "^0.5.1", | ||
"commander": "^2.5.0", | ||
"figlet": "^1.1.0", | ||
@@ -26,0 +27,0 @@ "lodash": "^2.4.1", |
awesome-job-dude | ||
================ | ||
a little bit of congrats | ||
#Installation | ||
``` | ||
brew install sox | ||
npm install -g awesome-job-dude | ||
```` | ||
awesome | ||
#Use | ||
``` | ||
``` | ||
Usage: awesome [options] | ||
Options: | ||
-h, --help output usage information | ||
-V, --version output the version number | ||
-y, --ytmnd You the man now dawg | ||
-k, --killinit Killing it | ||
-a, --awesome Awesome | ||
--hang Hang In there | ||
-b, --beef BEEF | ||
-o, --otmop On The Might Of Princes | ||
-c, --crushit Crushing it | ||
``` |
[ | ||
{ | ||
"voiceText":"YOU'RE AWESOME DUDE", | ||
"text": "Awesome!!" | ||
"text": "Awesome!!", | ||
"key" : "awesome" | ||
}, | ||
{ | ||
"voiceText":"YOU'RE CRUSHING IT", | ||
"text": "CRUSHING IT!!" | ||
"text": "CRUSHING IT!!", | ||
"key" : "crushingit" | ||
}, | ||
{ | ||
"voiceText":"hang in there kitty", | ||
"text": "HANG IN THERE!!" | ||
"text": "HANG IN THERE!!", | ||
"key" : "hang" | ||
}, | ||
{ | ||
"voiceText":"keep Killing it", | ||
"text": "KILLIN IT" | ||
"text": "KILLIN IT", | ||
"key" : "killinit" | ||
}, | ||
{ | ||
"voiceText":"I'll scream it until your ears bleed you'll always have a friend in me", | ||
"text": "KILLIN IT" | ||
"text": "KILLIN IT", | ||
"key" : "otmop" | ||
}, | ||
{ | ||
"voiceText":"That's a good crop of beef", | ||
"text": "BEEF" | ||
"text": "BEEF", | ||
"key" : "beef" | ||
}, | ||
{ | ||
"voiceText":"You're the man now dog", | ||
"text": "You da man now dog", | ||
"key" : "ytmnd" | ||
} | ||
] |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4211
78
29
6
+ Addedcommander@^2.5.0
+ Addedcommander@2.20.3(transitive)