diff --git a/Cargo.lock b/Cargo.lock index 2a0a9a44a9d..2aa2cbe390a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,6 +17,7 @@ dependencies = [ "libc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "libgit2-sys 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "mustache 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)", "registry 0.1.0", @@ -218,6 +219,15 @@ dependencies = [ "libc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "mustache" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "log 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "num_cpus" version = "0.2.6" diff --git a/Cargo.toml b/Cargo.toml index 65da37271b4..787ccdfe69b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,6 +35,7 @@ time = "0.1" toml = "0.1" url = "0.2" winapi = "0.1" +mustache = "0.6.1" [dev-dependencies] tempdir = "0.3" diff --git a/src/bin/new.rs b/src/bin/new.rs index fdfb0283e0c..552763eaebd 100644 --- a/src/bin/new.rs +++ b/src/bin/new.rs @@ -9,6 +9,7 @@ struct Options { flag_bin: bool, arg_path: String, flag_name: Option, + flag_template: Option, flag_vcs: Option, } @@ -20,31 +21,31 @@ Usage: cargo new -h | --help Options: - -h, --help Print this message - --vcs Initialize a new repository for the given version - control system (git or hg) or do not initialize any version - control at all (none) overriding a global configuration. - --bin Use a binary instead of a library template - --name Set the resulting package name - -v, --verbose Use verbose output + -h, --help Print this message + --vcs Initialize a new repository for the given version + control system (git or hg) or do not initialize any version + control at all (none) overriding a global configuration. + --bin Use a binary instead of a library template + --name Set the resulting package name + --template