-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
40 lines (40 loc) · 1.01 KB
/
main.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
#!/usr/bin/env node
import inquirer from 'inquirer';
import Chalk from 'chalk';
import Laravel from './ProjectBaseSystem/laravel.js';
import Vue from './ProjectBaseSystem/Vue.js';
import { getProjectTypeWithAI } from './utils/utils.js';
async function askQuestion() {
console.log(
Chalk.bgRed.white(
'[email protected]' + ' ' + Chalk.white('By Naimul Islam'),
),
);
try {
const { projectType } = await inquirer.prompt([
{
type: 'list',
name: 'projectType',
message: 'What kind of project do you want to create?',
choices: ['laravel', 'inertia.js', 'vue.js'],
default: getProjectTypeWithAI('./package.json'),
},
]);
switch (projectType) {
case 'laravel':
Laravel();
break;
case 'inertia.js':
Laravel();
break;
case 'vue.js':
Vue();
break;
default:
console.log('Please select a valid option');
}
} catch (error) {
console.log(error);
}
}
askQuestion();