feat: add authors, bin

This commit is contained in:
2020-11-21 23:42:39 +08:00
parent 73e8bfc4d8
commit 47363c5692
2 changed files with 15 additions and 1 deletions

View File

@@ -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"

View File

@@ -1,7 +1,7 @@
[package]
name = "{{project_name}}"
version = "0.0.1"
authors = ["Hatter Jiang <jht5945@gmail.com>"]
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"