This repository has been archived by the owner on May 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f66d84c
commit 169de31
Showing
4 changed files
with
46 additions
and
5 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
const chalk = require('chalk') | ||
const inquirer = require('inquirer') | ||
|
||
module.exports = args => { | ||
inquirer | ||
.prompt([ | ||
{ | ||
type: 'list', | ||
name: 'user', | ||
message: 'Who the heck are you?', | ||
choices: [ | ||
'Aryeh', | ||
'Colin', | ||
'Ed', | ||
'Fran', | ||
'Ildar', | ||
'John', | ||
'Laszlo', | ||
'Leo', | ||
'Mario', | ||
'Mathew', | ||
'Monika', | ||
'Steve', | ||
] | ||
} | ||
]) | ||
.then(({ user }) => { | ||
console.log( | ||
`Yay, it's ${chalk.bold.green(user)}! My favourie team member.` | ||
) | ||
}) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
#!/usr/bin/env node | ||
|
||
const chalk = require('chalk') | ||
const helloCmd = require('./commands/hello') | ||
|
||
const args = process.argv.splice(2) | ||
|
||
console.log( | ||
`The ${chalk.bold(args.join(' '))} command is not defined... yet!` | ||
) | ||
switch(args[0]) { | ||
case 'hello': | ||
helloCmd(args) | ||
break | ||
|
||
default: | ||
console.log( | ||
`The ${chalk.bold.red(args.join(' '))} command is not defined... yet!` | ||
) | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3070,7 +3070,7 @@ [email protected]: | |
strip-ansi "^3.0.0" | ||
through "^2.3.6" | ||
|
||
inquirer@^6.0.0: | ||
inquirer@^6.0.0, inquirer@^6.2.0: | ||
version "6.2.0" | ||
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.2.0.tgz#51adcd776f661369dc1e894859c2560a224abdd8" | ||
dependencies: | ||
|