mirror of
https://github.com/strapi/strapi.git
synced 2025-12-29 08:04:51 +00:00
Re-enable templates
This commit is contained in:
parent
e3418695b6
commit
4fef307c46
@ -57,11 +57,12 @@ async function getTemplateQuestion() {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {string|null} projectName - The name of the project
|
||||
* @param {string|null} template - The template the project should use
|
||||
* @returns Array of prompt question objects
|
||||
*/
|
||||
// TODO: re-enabled once the template have been migrated to V4
|
||||
async function getPromptQuestions(projectName /*, template */) {
|
||||
async function getPromptQuestions(projectName, template) {
|
||||
return [
|
||||
{
|
||||
type: 'input',
|
||||
@ -85,14 +86,13 @@ async function getPromptQuestions(projectName /*, template */) {
|
||||
},
|
||||
],
|
||||
},
|
||||
// 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)',
|
||||
// },
|
||||
{
|
||||
type: 'confirm',
|
||||
name: 'useTemplate',
|
||||
when: !template,
|
||||
message:
|
||||
'Would you like to use a template? (Templates are Strapi configurations designed for a specific use case)',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@ -18,19 +18,7 @@ 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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user