We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have the following code:
/** * @param {import('plop').NodePlopAPI} plop - The plop API object */ export default function (plop) { // create your generators here plop.setGenerator("add-service", { description: "adds service", // prompts: [ // { // type: "input", // name: "name", // message: "controller name", // }, // ], async prompts(inquirer) { const initPrompts = [ { type: "input", name: "name", message: "controller name", }, ]; for (let i = 0; i < initPrompts.length; i++) { const element = initPrompts[i]; await inquirer.prompt(element); } }, actions: [ { type: "add", path: "output/packages/http/src/services/{{pascalCase name}}Service.ts", templateFile: "plop-templates/add-service/packages/http/src/services/service.hbs", }, ], }); }
Above will fail with the following error when we specify `{{pascalCase name}}:
Cannot read properties of undefined (reading 'replace')
But will pass if it was done with the commented out block instead of a dynamic async block:
// prompts: [ // { // type: "input", // name: "name", // message: "controller name", // }, // ],
Additionally, if we don't specify the case modifier, it will be undefined.
Version: 4.0.1
4.0.1
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have the following code:
Above will fail with the following error when we specify `{{pascalCase name}}:
But will pass if it was done with the commented out block instead of a dynamic async block:
Additionally, if we don't specify the case modifier, it will be undefined.
Version:
4.0.1
The text was updated successfully, but these errors were encountered: