CLI to install project (#164)

* CLI to install project

* CLI fixes

* Update README.md

* Cleanup gitignore
This commit is contained in:
Félix Malfait
2023-06-01 09:19:49 +02:00
committed by GitHub
parent 7d87598953
commit e8f1146ae1
22 changed files with 6639 additions and 0 deletions

View File

@ -0,0 +1,27 @@
import prompts, { PromptObject } from 'prompts';
import { askDemoCloudQuestions } from './cloud.js';
import { askDemoDockerQuestions } from './docker.js';
export const demoQuestions: PromptObject<string>[] = [
{
type: 'select',
name: 'demo_type',
message: 'How do you want to try the app?',
choices: [
{ title: 'Cloud demo', value: 'cloud' },
{ title: 'Local docker image', value: 'docker', disabled: true },
],
},
];
export const askDemoQuestions: () => Promise<void> = async () => {
const response = await prompts(demoQuestions);
switch (response.demo_type) {
case 'cloud':
await askDemoCloudQuestions();
break;
case 'docker':
await askDemoDockerQuestions();
break;
}
};