CLI to install project (#164)
* CLI to install project * CLI fixes * Update README.md * Cleanup gitignore
This commit is contained in:
27
cli/src/install/demo/index.ts
Normal file
27
cli/src/install/demo/index.ts
Normal 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;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user