-
Notifications
You must be signed in to change notification settings - Fork 63
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
Feat: Add automation script to generate component #1039
Feat: Add automation script to generate component #1039
Conversation
Signed-off-by: Arthur Andrade <arthurfelandrade@gmail.com>
Signed-off-by: Arthur Andrade <arthurfelandrade@gmail.com>
✔️ Deploy Preview for faststoreui ready! 🔨 Explore the source changes: c9d1aac 🔍 Inspect the deploy log: https://app.netlify.com/sites/faststoreui/deploys/61a8dc928b80ea00077bfb29 😎 Browse the preview: https://deploy-preview-1039--faststoreui.netlify.app |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit c9d1aac:
|
Is there any readme file that we can add this information? 👀 |
Maybe add it on contributing.md? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AMAZING WORK! 🎉🎉🎉
😲 Good addition @ArthurTriis1 !! Can you add a brief instruction inside the docs/component-architecture.md ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job, guys! 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!! 🚀
Co-authored-by: Larícia Mota <laricia.mota@vtex.com.br>
Co-authored-by: Larícia Mota <laricia.mota@vtex.com.br>
Co-authored-by: Larícia Mota <laricia.mota@vtex.com.br>
Co-authored-by: Larícia Mota <laricia.mota@vtex.com.br>
Co-authored-by: Larícia Mota <laricia.mota@vtex.com.br>
@ArthurTriis1 Actually, I think we can move the instruction from |
99c4738
to
501cfdf
Compare
Signed-off-by: Arthur Andrade <arthurfelandrade@gmail.com>
501cfdf
to
c9d1aac
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job guys! It will be very useful.
Really good job here, @ArthurTriis1 ✨ Do we still need to work? hahaha |
What's the purpose of this pull request?
We noticed that every time we wanted to create a new component, we created many new files. So, we thought it might be a good idea to generate these default templates automatically. It will help our development experience and we can waste less time making the "boilerplates files" and jump into the component itself, decreasing the chances of forgetting to update/create a file.
We are using Plop framework to generate those files.
How it works?
yarn generate
it will create all the base files with the component given name;
It will create a folder for the component under its atomic group;
Files generated automatically:
And that is it! You will be ready to work on your component. 🎉
-
, i.e,Component-Name
// Atoms
,// Molecules
,// Organisms
onpackages/ui/scr/index.ts
file, because we are using it as pattern to update it.We are using templates files just with the base structure according to what we find helpful to have. You can take a look into it on
generators/templates
folder.Are you missing any files? Or is there anything else we can generate automatically? Any suggestions? Please, feel free to leave a comment below 🙃
References