mirror of
https://github.com/strapi/strapi.git
synced 2025-12-27 15:13:21 +00:00
fixing file paths when generating CT inside plugins
This commit is contained in:
parent
d12900c0be
commit
2435689d50
@ -65,6 +65,7 @@ module.exports = plop => {
|
||||
};
|
||||
},
|
||||
actions(answers) {
|
||||
const resolveFilePath = (isPlugin,filePath) => isPlugin ? `${filePath}/server` : filePath;
|
||||
const attributes = answers.attributes.reduce((object, answer) => {
|
||||
const val = { type: answer.attributeType };
|
||||
|
||||
@ -80,7 +81,7 @@ module.exports = plop => {
|
||||
return Object.assign(object, { [answer.attributeName]: val }, {});
|
||||
}, {});
|
||||
|
||||
const filePath = getFilePath(answers.destination);
|
||||
const filePath = resolveFilePath(answers.plugin,getFilePath(answers.destination));
|
||||
|
||||
const baseActions = [
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user