Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[FEATURE] Add config option for custom name choices #3

Merged

Conversation

chaoticbear
Copy link
Contributor

@chaoticbear chaoticbear commented Feb 23, 2022

Proposal

The current plop generator uses standard naming conventions from atomic design as the name suggests.

In our workflow, we're using NextJS which includes a pages directory at the root of the project (which is not rename-able) used for page routes. To avoid confusion we wanted to modify that to page-components.

To do this we added an option to customize the atomic name choices. This has the added benefit of letting a group use atomic design principles while being creative with how what they're called.

Usage

The project defaults to using the original atomic names, and the config is not required to exist.

To customize the name choices, add the following option to the plopfile atomicGenerator config with whichever custom names you'd like to use:

choices: ['Atoms', 'Molecules', 'Organisms', 'PageComponents', 'Templates'],

Goal is to add an option to customize the name choices in the prompt and directories used.

@chaoticbear chaoticbear changed the title [FEATURE] Add config option for custom name choices [WIP][FEATURE] Add config option for custom name choices Feb 23, 2022
@chaoticbear chaoticbear force-pushed the jf/feature/add-config-custom-names branch from 2ebb8c6 to 2f30949 Compare February 23, 2022 07:35
@chaoticbear chaoticbear marked this pull request as ready for review March 3, 2022 17:53
@chaoticbear
Copy link
Contributor Author

@ahoendgen let me know what you think of this PR. This and the others (#4 #5) have been really useful for our workflow and we hope they can help other people who use your tool. I'm happy to make any changes you need to these.

@chaoticbear chaoticbear changed the title [WIP][FEATURE] Add config option for custom name choices [FEATURE] Add config option for custom name choices Mar 3, 2022
@ahoendgen ahoendgen merged commit 6711d75 into ahoendgen:master Jan 23, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants