diff --git a/template.toml b/template.toml index 00674aa..588f46a 100644 --- a/template.toml +++ b/template.toml @@ -22,6 +22,16 @@ default = "my-cli" prompt = "What's the name of the executable?" validation = "^([a-zA-Z][a-zA-Z-_]+)$" +[[variables]] +name = "author" +default = "No One" +prompt = "What is your name?" + +[[variables]] +name = "email" +default = "no@example.com" +prompt = "What is your email?" + [[variables]] name = "license" default = "MIT" diff --git a/{{project_name}}/Cargo.toml b/{{project_name}}/Cargo.toml index 478f19b..52ad13e 100644 --- a/{{project_name}}/Cargo.toml +++ b/{{project_name}}/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "{{project_name}}" version = "0.0.1" -authors = ["Hatter Jiang "] +authors = ["{{author}} <{{email}}>"] edition = "2018" {% if license != "None" -%} license = "{{license}}" @@ -10,6 +10,10 @@ description = "{{description}}" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[[bin]] +name = "{{bin}}" +path = "src/main.rs" + [dependencies] clap = "2.33" toml = "0.5"