Skip to content
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: refactor the code, improve usability and code structure #46

Merged

Conversation

JackHamer09
Copy link
Member

@JackHamer09 JackHamer09 commented Sep 1, 2023

What 💻

  • The entire app has been refactored to use commander.js as its command manager.
  • By passing command options (flags), you can now execute each command instantly without encountering any prompts.
  • Improved file structure. For example, all commands have been moved to the commands/ folder. Various utility scripts have been added to the utils/ folder.
  • Renamed confirm-withdraw to withdraw-finalize and create to create-project.
  • Enhanced command and option descriptions. Updated the README file.

Why ✋

  • To make the app more scalable, a more efficient way to manage commands was required. commander.js was selected due to its popularity and ease of use.
  • Introducing the possibility to pass command options makes the app easier to use with predefined parameters, allowing users to bypass prompts.
  • To enhance code maintainability, the file structure was reorganized for greater convenience.
  • The command confirm-withdraw was renamed to ensure consistency in language across all textual resources. create was renamed to be more descriptive and to reduce ambiguity.
  • Both command and option descriptions were refined for clarity and to maintain a consistent language. The README file was revised to align with the latest changes.

Evidence 📷

image

Notes 📝

  • Separate PR to docs will be created with updated zksync-cli description before merging this PR.
  • Try it our with npx [email protected]

@JackHamer09 JackHamer09 temporarily deployed to production release September 5, 2023 15:10 — with GitHub Actions Inactive
@JackHamer09 JackHamer09 marked this pull request as ready for review September 5, 2023 15:12
@JackHamer09 JackHamer09 requested a review from a team as a code owner September 5, 2023 15:12
@dutterbutter
Copy link
Contributor

This is awesome @JackHamer09 💯

One issue I ran into while initially testing is when I run npx [email protected] create-project test-project and select Hardhat + Solidity it creates the repo using the vyper template. Can you confirm that issue?

src/commands/deposit.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@MexicanAce MexicanAce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JackHamer09 JackHamer09 merged commit 632cb36 into main Sep 6, 2023
2 checks passed
@JackHamer09 JackHamer09 deleted the dr-devrl-266-refactor-the-code-to-better-manage-commands branch September 6, 2023 11:14
@github-actions
Copy link

github-actions bot commented Sep 6, 2023

🎉 This PR is included in version 0.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants