Description
We need to create a reusable folder called component-template that developers can clone and use as a starting point for creating new components in TypeScript. This will streamline development and ensure consistency across the codebase.
The folder should include the following files:
index.ts
ComponentTemplate.tsx
ComponentTemplate.css
ComponentTemplate.types.ts
ComponentTemplate.stories.tsx
README.mdx
Note: The decision on test file inclusion is pending as the team is discussing options (e.g., no snapshot testing). Follow up with Desi regarding testing strategies.
Bonus: Implement a CLI tool that can automate the cloning of this folder, prompting the user for the new component name and replacing ComponentTemplate with the provided name throughout the files.
Technical Details
-
Set up a component-template folder with the specified files.
-
Ensure each file follows the standard component structure and is easy to update with a new component name.
-
BONUS: The CLI tool should:
- Clone the folder.
- Replace the placeholder name (
ComponentTemplate) with a user-provided name in all files.
- Be simple to run and easy to use for developers.
-
No test files will be included for now, pending further discussions on testing strategy.
Acceptance Criteria
- A fully working
component-template folder is created and can be used to create new components quickly.
- BONUS: CLI tool successfully clones the folder and updates the component name based on user input.
- Decision on tests documented after discussions with the team.
References
- Ongoing discussion with Desi about tests and snapshots.
- Link to any previous conversations on CLI tooling.
This ticket sets the stage for simplifying component creation while ensuring flexibility as testing strategies evolve.
Description
We need to create a reusable folder called
component-templatethat developers can clone and use as a starting point for creating new components in TypeScript. This will streamline development and ensure consistency across the codebase.The folder should include the following files:
index.tsComponentTemplate.tsxComponentTemplate.cssComponentTemplate.types.tsComponentTemplate.stories.tsxREADME.mdxNote: The decision on test file inclusion is pending as the team is discussing options (e.g., no snapshot testing). Follow up with Desi regarding testing strategies.
Bonus: Implement a CLI tool that can automate the cloning of this folder, prompting the user for the new component name and replacing
ComponentTemplatewith the provided name throughout the files.Technical Details
Set up a
component-templatefolder with the specified files.Ensure each file follows the standard component structure and is easy to update with a new component name.
BONUS: The CLI tool should:
ComponentTemplate) with a user-provided name in all files.No test files will be included for now, pending further discussions on testing strategy.
Acceptance Criteria
component-templatefolder is created and can be used to create new components quickly.References
This ticket sets the stage for simplifying component creation while ensuring flexibility as testing strategies evolve.