mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 17:00:55 +00:00
Merge pull request #11043 from strapi/v4/disable-template
Disable templates for the moment
This commit is contained in:
commit
88bff3cb27
@ -60,7 +60,8 @@ async function getTemplateQuestion() {
|
|||||||
*
|
*
|
||||||
* @returns Array of prompt question objects
|
* @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 [
|
return [
|
||||||
{
|
{
|
||||||
type: 'input',
|
type: 'input',
|
||||||
@ -84,13 +85,14 @@ async function getPromptQuestions(projectName, template) {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
// TODO: re-enabled once the template have been migrated to V4
|
||||||
type: 'confirm',
|
// {
|
||||||
name: 'useTemplate',
|
// type: 'confirm',
|
||||||
when: !template,
|
// name: 'useTemplate',
|
||||||
message:
|
// when: !template,
|
||||||
'Would you like to use a template? (Templates are Strapi configurations designed for a specific use case)',
|
// message:
|
||||||
},
|
// 'Would you like to use a template? (Templates are Strapi configurations designed for a specific use case)',
|
||||||
|
// },
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,19 @@ sentry.init({
|
|||||||
dsn: 'https://841d2b2c9b4d4b43a4cde92794cb705a@sentry.io/1762059',
|
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) => {
|
module.exports = (projectDirectory, cliArguments) => {
|
||||||
|
warnTemplatesAreDisabled(cliArguments);
|
||||||
|
|
||||||
checkRequirements();
|
checkRequirements();
|
||||||
|
|
||||||
const rootPath = resolve(projectDirectory);
|
const rootPath = resolve(projectDirectory);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user