forked from D3vl0per/Twitch-watcher
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinput.js
27 lines (27 loc) · 768 Bytes
/
input.js
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');
exports.askLogin = () => {
const questions = [{
name: 'token',
type: 'password',
message: 'Enter your auth-token from twitch.tv 🔑:',
validate: function(value) {
if (value.length) {
return true;
} else {
return 'Please enter your valid token!';
}
}
}, {
name: 'exec',
type: 'input',
message: 'Enter the chromium executable path (usually /usr/bin/chromium-browser or /usr/bin/chromium or C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe):',
validate: function(value) {
if (value.length) {
return true;
} else {
return 'Please enter your valid path!';
}
}
}];
return inquirer.prompt(questions);
};