Skip to content
New issue

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

Folder name case #361

Open
amrit-codebuckets opened this issue Oct 18, 2022 · 0 comments
Open

Folder name case #361

amrit-codebuckets opened this issue Oct 18, 2022 · 0 comments

Comments

@amrit-codebuckets
Copy link

Is there any way to change the case of the folder create. I can change case of the file. But I haven't found nay way to change case of the folder. Please help

Plop file

const componentGenerator = require('./component/index');
module.exports = plop => {

plop.setHelper('name', function (text) {
    return text.toLowerCase();
});
plop.setGenerator('component', componentGenerator);

}

Component File

prompts: [
{
type: 'input',
name: 'name',
message: 'name of the component?',
default: 'buttonCase',
filter: function (name) {
return name.toLowerCase()
},

    },
],

This is my base code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant