-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathinquirer.js
More file actions
27 lines (26 loc) · 864 Bytes
/
inquirer.js
File metadata and controls
27 lines (26 loc) · 864 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
const inquirer = require('inquirer');
module.exports = {
login: () => {
const questions = [
{
name: 'email',
type: 'input',
message: 'Email:',
validate: function(value) {
if (value.length) return true;
else return 'Please enter the email address you used to sign up on Ethernal.';
}
},
{
name: 'password',
type: 'password',
message: 'Password (will be securely stored in your local keychain):',
validate: function(value) {
if (value.length) return true;
else return 'Please enter your password.';
}
}
];
return inquirer.prompt(questions);
}
};