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

Consider adding a templating system to "move new" #91

Open
mario4tier opened this issue Jan 25, 2024 · 0 comments
Open

Consider adding a templating system to "move new" #91

mario4tier opened this issue Jan 25, 2024 · 0 comments
Labels
enhancement New feature or request low priority

Comments

@mario4tier
Copy link
Member

mario4tier commented Jan 25, 2024

As of right now, a "sui move new" create an empty "sources" file.

In a discord discussion, @ivmidable proposed the following:

> gotcha cool, one thing id like to see change with sui move new is for it to create a basic .move
> file named after the package. so for instance if I did sui move new start it would create a
> start.move file inside of sources
> that basically has this https://gist.github.com/ivmidable/6aac5acb1bba0cd1e0058b9bd9a47772

Suggested Implementation
Add to Suibase a "template" directory where the user can control the initial .move and even add more files (e.g. a .gitignore of the build artifacts).

The Suibase scripts will detect that the user is trying to do a "move new" and will do the additional customization specified in:
~/suibase/workdirs/common/templates/move_new/default

The template .move files can specify a "$MODULE_NAME" that will be automatically replace with the new module name created.

Other potential enhancement
The "move_new/default" is for when doing "move new". User can define additional template such as "move_new/hello_world" and use it with "move new --template hello_world".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low priority
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant