-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
42 lines (41 loc) · 1.11 KB
/
index.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import inquirer from 'inquirer';
import traitsGenerator from './src/traits-generator.js';
import rarityCalculator from './src/rarity-calculator.js';
import artworkGenerator from './src/artwork-generator.js';
import mint from './src/mint.js';
inquirer
.prompt([
{
type: 'list',
name: 'Options',
message: 'Select what you want to do',
choices: ['Full generate', 'Generate traits', 'Calculate rarity', 'Generate artwork', 'Mint', 'Exit'],
},
])
.then(async answers => {
if (answers.Options == "Exit") {
process.exit()
} else {
switch (answers.Options) {
case 'Full generate':
await traitsGenerator();
await rarityCalculator();
await artworkGenerator();
break;
case 'Generate traits':
await traitsGenerator();
break;
case 'Calculate rarity':
await rarityCalculator();
break;
case 'Generate artwork':
await artworkGenerator();
break;
case 'Mint':
await mint();
break;
default:
break;
}
}
})