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

Improve version management in templates from znap-cli #23

Open
danmt opened this issue Jun 19, 2024 · 0 comments
Open

Improve version management in templates from znap-cli #23

danmt opened this issue Jun 19, 2024 · 0 comments
Labels
cli This issue is related to the CLI enhancement New feature or request

Comments

@danmt
Copy link
Contributor

danmt commented Jun 19, 2024

The templates used by the CLI look like this:

use heck::ToKebabCase;

pub fn template(name: &String) -> String {
    format!("[package]\n\
        name = \"{}\"\n\
        version = \"0.1.0\"\n\
        edition = \"2021\"\n\
        \n[dependencies]\n\
        axum = \"0.7.5\"\n\
        serde = \"1.0.203\"\n\
        solana-sdk = \"2.0.1\"\n\
        spl-associated-token-account = \"3.0.2\"\n\
        spl-token = \"4.0.1\"\n\
        znap = \"0.1.19\"\n\
    ", name.to_kebab_case())
}

Reference to the file

Meaning that all dependencies are hard-coded at the template level, it would be nicer to have a way to track those dependencies as concrete values rather than hard-coded strings. Adding new dependencies should be adding an entry to an array or struct.

@danmt danmt added the enhancement New feature or request label Jun 19, 2024
@danmt danmt added cli This issue is related to the CLI missing information This issue is missing information enhancement New feature or request and removed enhancement New feature or request missing information This issue is missing information labels Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli This issue is related to the CLI enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant