diff --git a/packages/cli/create-strapi-app/utils/prompt-user.js b/packages/cli/create-strapi-app/utils/prompt-user.js index aed88ce252..60014e819a 100644 --- a/packages/cli/create-strapi-app/utils/prompt-user.js +++ b/packages/cli/create-strapi-app/utils/prompt-user.js @@ -60,7 +60,8 @@ async function getTemplateQuestion() { * * @returns Array of prompt question objects */ -async function getPromptQuestions(projectName, template) { +// TODO: re-enabled once the template have been migrated to V4 +async function getPromptQuestions(projectName /*, template */) { return [ { type: 'input', @@ -84,13 +85,14 @@ async function getPromptQuestions(projectName, template) { }, ], }, - { - type: 'confirm', - name: 'useTemplate', - when: !template, - message: - 'Would you like to use a template? (Templates are Strapi configurations designed for a specific use case)', - }, + // TODO: re-enabled once the template have been migrated to V4 + // { + // type: 'confirm', + // name: 'useTemplate', + // when: !template, + // message: + // 'Would you like to use a template? (Templates are Strapi configurations designed for a specific use case)', + // }, ]; } diff --git a/packages/generators/app/lib/index.js b/packages/generators/app/lib/index.js index f5d2f03458..66e29dda89 100644 --- a/packages/generators/app/lib/index.js +++ b/packages/generators/app/lib/index.js @@ -18,7 +18,19 @@ sentry.init({ dsn: 'https://841d2b2c9b4d4b43a4cde92794cb705a@sentry.io/1762059', }); +// TODO: to remove after the templates are updated for V4 +const warnTemplatesAreDisabled = cliArguments => { + if (cliArguments.template) { + console.log( + '❌ Templates have been disabled for the Beta version of V4 and will be re-enabled soon!' + ); + process.exit(); + } +}; + module.exports = (projectDirectory, cliArguments) => { + warnTemplatesAreDisabled(cliArguments); + checkRequirements(); const rootPath = resolve(projectDirectory);