UNPKG

create-strapi-app

Version:

Generate a new Strapi application.

67 lines (63 loc) 1.71 kB
'use strict'; var inquirer = require('inquirer'); async function directory() { const { directory } = await inquirer.prompt([ { 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([ { type: 'confirm', name: 'useTypescript', message: 'Start with Typescript?', default: true } ]); return useTypescript; } async function example() { const { useExample } = await inquirer.prompt([ { type: 'confirm', name: 'useExample', message: 'Start with an example structure & data?', default: false } ]); return useExample; } async function gitInit() { const { gitInit } = await inquirer.prompt([ { type: 'confirm', name: 'gitInit', message: 'Initialize a git repository?', default: true } ]); return gitInit; } async function installDependencies(packageManager) { const { installDependencies } = await inquirer.prompt([ { type: 'confirm', name: 'installDependencies', message: `Install dependencies with ${packageManager}?`, default: true } ]); return installDependencies; } exports.directory = directory; exports.example = example; exports.gitInit = gitInit; exports.installDependencies = installDependencies; exports.typescript = typescript; //# sourceMappingURL=prompts.js.map