-
Notifications
You must be signed in to change notification settings - Fork 26
Coding guidelines~Component templates
Cory Crowley edited this page Apr 21, 2022
·
2 revisions
The Cardboard repo contains a Node.js utility script to generate templated files for a new component. This utility allows new component to be scaffolded out without manually writing the basic component code.
To create a new component via the template script, execute:
npm run generate <component_name>
- Templated components will be created @
./src/Components/<component_name>
- To see an example of the templated component structure, run
npm run generate MyNewComponent
- Cardboard components should use CamelCase with the first letter capitalized.
- To view / modify component templates, see the templates folder
- To view / modify the template creation utility, see the utility script
If you have a question for one of the project maintainers, please post the question here. We'll get back to you as soon as possible!