We need to create CLI scripts for generating component templates. The CLI should prompt the user to specify whether the component is for React or React Native, as well as ask for the component's name.
Technical Details
The CLI should first prompt the user to choose between React or React Native.
Based on the choice, different component templates should be generated.
React template: Include necessary TSX structure, hooks, etc.
React Native template: Include mobile-specific components, views, and styling.
The CLI should also prompt for the component's name and use it to correctly set up the file and folder structure (e.g., /components/[ComponentName]/[ComponentName].jsx) in the appropriate package
The script should handle naming conventions and import/export structures according to project guidelines.
Acceptance Criteria
CLI script asks the user for the framework (React or React Native).
CLI script asks the user for the component's name.
Based on the responses, the appropriate component template is generated and placed in the correct folder structure.
No additional configuration should be required after generation.
Code style should follow project conventions.
References
Check project documentation for existing component structure guidelines.
Issue numbers, links to Slack threads, etc. can be added as references here.
Description
We need to create CLI scripts for generating component templates. The CLI should prompt the user to specify whether the component is for React or React Native, as well as ask for the component's name.
Technical Details
/components/[ComponentName]/[ComponentName].jsx
) in the appropriate packageAcceptance Criteria
References