-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
33 lines (30 loc) · 986 Bytes
/
index.js
File metadata and controls
33 lines (30 loc) · 986 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
28
29
30
31
32
33
#!/usr/bin/env node
const chalk = require('chalk');
const clear = require('clear');
const figlet = require('figlet');
const inquirer = require('./lib/inquirer');
const package = require('./package.json');
clear();
console.log(chalk.yellow(figlet.textSync('GeoX', { horizontalLayout: 'full' })));
console.log(chalk.blue("Geolocation tools / by hiago.me"));
console.log(chalk.red("Version " + package.version));
const run = () => {
inquirer.disposeActions().then((result) => {
if(result.options !== 'exit') {
console.log("");
inquirer[result.options]().then((r) => {
console.log("");
run();
}).catch((error) => {
console.log(chalk.red('Error: ', error));
console.log("");
run();
});
}
}).catch((error) => {
console.log(chalk.red('Error: ', error));
console.log("");
run();
});
}
run();