mirror of
https://github.com/strapi/strapi.git
synced 2025-08-25 17:19:46 +00:00
34 lines
639 B
TypeScript
34 lines
639 B
TypeScript
![]() |
import inquirer from 'inquirer';
|
||
|
|
||
|
async function directory() {
|
||
|
const { directory } = await inquirer.prompt<{
|
||
|
directory: string;
|
||
|
}>([
|
||
|
{
|
||
|
type: 'input',
|
||
|
default: 'my-strapi-project',
|
||
|
name: 'directory',
|
||
|
message: 'What is the name of your project?',
|
||
|
},
|
||
|
]);
|
||
|
|
||
|
return directory;
|
||
|
}
|
||
|
|
||
|
async function typescript() {
|
||
|
const { useTypescript } = await inquirer.prompt<{
|
||
|
useTypescript: boolean;
|
||
|
}>([
|
||
|
{
|
||
|
type: 'confirm',
|
||
|
name: 'useTypescript',
|
||
|
message: 'Do you want to use Typescript ?',
|
||
|
default: true,
|
||
|
},
|
||
|
]);
|
||
|
|
||
|
return useTypescript;
|
||
|
}
|
||
|
|
||
|
export { directory, typescript };
|