I have made a customized version of the Vue Webpack template and am currently modifying the meta.js file. I am attempting to figure out how to include a new property in prompts
as shown below:
"pages": {
"type": "input",
"required": true,
"message": "How many pages would you like your template to have?"
},
Subsequently, I want to utilize the pages
variable to introduce additional questions, like this:
"page1": {
"type": "string",
"required": true,
"message": "What would you like to name page1?"
},
My idea is to create a loop outside of the object that dynamically adds properties to it. However, the issue arises that the loop is executed at the same time as the object is loaded, resulting in undefined variables. Any suggestions on how to solve this problem?