mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 16:29:34 +00:00
rename prompts files
This commit is contained in:
parent
efbd9fcf42
commit
15d8392f24
@ -3,11 +3,11 @@
|
||||
const { join } = require('path');
|
||||
const fs = require('fs-extra');
|
||||
const validateInput = require('./utils/validate-input');
|
||||
const getCtNamesPrompts = require('./prompts/get-ct-names-prompts');
|
||||
const getKindPrompts = require('./prompts/get-kind-prompts');
|
||||
const getDraftAndPublishPrompts = require('./prompts/get-draft-and-publish-prompts');
|
||||
const ctNamesPrompts = require('./prompts/ct-names-prompts');
|
||||
const kindPrompts = require('./prompts/kind-prompts');
|
||||
const draftAndPublishPrompts = require('./prompts/draft-and-publish-prompts');
|
||||
const getAttributesPrompts = require('./prompts/get-attributes-prompts');
|
||||
const getDefaultRoutesPrompts = require('./prompts/get-default-routes-prompts');
|
||||
const defaultRoutesPrompts = require('./prompts/default-routes-prompts');
|
||||
|
||||
module.exports = plop => {
|
||||
// API generator
|
||||
@ -64,10 +64,10 @@ module.exports = plop => {
|
||||
return {
|
||||
...api,
|
||||
...(await inquirer.prompt([
|
||||
...getCtNamesPrompts,
|
||||
...getKindPrompts,
|
||||
...getDraftAndPublishPrompts,
|
||||
...getDefaultRoutesPrompts,
|
||||
...ctNamesPrompts,
|
||||
...kindPrompts,
|
||||
...draftAndPublishPrompts,
|
||||
...defaultRoutesPrompts,
|
||||
])),
|
||||
attributes: await getAttributesPrompts(inquirer),
|
||||
};
|
||||
|
@ -4,9 +4,9 @@ const slugify = require('@sindresorhus/slugify');
|
||||
|
||||
const getDestinationPrompts = require('./prompts/get-destination-prompts');
|
||||
const getFilePath = require('./utils/get-file-path');
|
||||
const getCtNamesPrompts = require('./prompts/get-ct-names-prompts');
|
||||
const getKindPrompts = require('./prompts/get-kind-prompts');
|
||||
const getDraftAndPublishPrompts = require('./prompts/get-draft-and-publish-prompts');
|
||||
const ctNamesPrompts = require('./prompts/ct-names-prompts');
|
||||
const kindPrompts = require('./prompts/kind-prompts');
|
||||
const draftAndPublishPrompts = require('./prompts/draft-and-publish-prompts');
|
||||
const getAttributesPrompts = require('./prompts/get-attributes-prompts');
|
||||
|
||||
module.exports = plop => {
|
||||
@ -15,10 +15,10 @@ module.exports = plop => {
|
||||
description: 'Generate a content type for an API',
|
||||
async prompts(inquirer) {
|
||||
const config = await inquirer.prompt([
|
||||
...getCtNamesPrompts,
|
||||
...getKindPrompts,
|
||||
...ctNamesPrompts,
|
||||
...kindPrompts,
|
||||
...getDestinationPrompts('model', plop.getDestBasePath()),
|
||||
...getDraftAndPublishPrompts,
|
||||
...draftAndPublishPrompts,
|
||||
]);
|
||||
const attributes = await getAttributesPrompts(inquirer);
|
||||
|
||||
|
@ -6,6 +6,7 @@ module.exports = {
|
||||
handler: '{{id}}.find',
|
||||
config: {
|
||||
policies: [],
|
||||
middlewares: [],
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -14,6 +15,7 @@ module.exports = {
|
||||
handler: '{{id}}.findOne',
|
||||
config: {
|
||||
policies: [],
|
||||
middlewares: [],
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -22,6 +24,7 @@ module.exports = {
|
||||
handler: '{{id}}.create',
|
||||
config: {
|
||||
policies: [],
|
||||
middlewares: [],
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -30,6 +33,7 @@ module.exports = {
|
||||
handler: '{{id}}.update',
|
||||
config: {
|
||||
policies: [],
|
||||
middlewares: [],
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -38,6 +42,7 @@ module.exports = {
|
||||
handler: '{{id}}.delete',
|
||||
config: {
|
||||
policies: [],
|
||||
middlewares: [],
|
||||
},
|
||||
},
|
||||
],
|
||||
|
@ -6,6 +6,7 @@ module.exports = {
|
||||
// handler: '{{id}}.exampleAction',
|
||||
// config: {
|
||||
// policies: [],
|
||||
// middlewares: [],
|
||||
// },
|
||||
// },
|
||||
],
|
||||
|
@ -6,6 +6,7 @@ module.exports = {
|
||||
handler: '{{id}}.find',
|
||||
config: {
|
||||
policies: [],
|
||||
middlewares: [],
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -14,6 +15,7 @@ module.exports = {
|
||||
handler: '{{id}}.update',
|
||||
config: {
|
||||
policies: [],
|
||||
middlewares: [],
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -22,6 +24,7 @@ module.exports = {
|
||||
handler: '{{id}}.delete',
|
||||
config: {
|
||||
policies: [],
|
||||
middlewares: [],
|
||||
},
|
||||
},
|
||||
],
|
||||
|
Loading…
x
Reference in New Issue
Block a user