#460·plop

[Enhancement] Add a prompt feedback instead of default ones

Author: JulSeb42Created Nov 18, 2024Updated Nov 18, 2024

I'm looking for a solution to change the default feedback when running plop. For example if we create a new page on our app; we get this:

typescript
plop.setGenerator("demo", {
    prompts: [],
    actions: [

        {
            type: "add",
            path: "./page.ts",
            template: `<h1>Hello World</h1>`,
        },
    ],
})

it would return:

bash
✔  ++ /page.ts

I would prefer to have the possibility to change this to a custom message like this:

typescript
plop.setGenerator("demo", {
    prompts: [],
    actions: [
        "Adding your new page",
        {
            type: "add",
            path: "./page.ts",
            template: `<h1>Hello World</h1>`,
            message: "✅ Your new page was added!"
        },
    ],
})

Which would return

bash
ℹ Adding your new page
✔  ++ /page.ts

Here I'd like to either remove the line ✔ ++ /page.ts, or having the possibility to change the message to ✅ Your new page was added!

Would this be possible? Thanks!