]> git.proxmox.com Git - cargo.git/commit
Cargo templating for `new` and `init`
authorEwan Higgs <ewan.higgs@hgst.com>
Tue, 16 Aug 2016 23:58:05 +0000 (01:58 +0200)
committerEwan Higgs <ewan_higgs@yahoo.co.uk>
Tue, 31 Jan 2017 09:23:42 +0000 (10:23 +0100)
commit875a8aba7916b63c3c8464008a271f6082e23779
tree022efbf6e9660e97f3cb555903196b15b31d8dce
parent546212ccc2c488595e3ce6a2a70bb512948c9da3
Cargo templating for `new` and `init`

PR #3004 This is a resubmission of the PR #1747 (from scratch) which adds
support for templating in Cargo. The templates are implemented using the
handlebars crate (where the original PR used mustache).

Examples:
cargo new --template https://url/to/template somedir foo
cargo new --template https://url/to/templates --template-subdir somedir foo
cargo new --template ../path/to/template somedir foo
16 files changed:
Cargo.lock
Cargo.toml
src/bin/init.rs
src/bin/new.rs
src/cargo/lib.rs
src/cargo/ops/cargo_new.rs
src/cargo/sources/git/mod.rs
src/cargo/sources/git/utils.rs
src/cargo/util/errors.rs
src/cargo/util/mod.rs
src/cargo/util/paths.rs
src/cargo/util/template.rs [new file with mode: 0644]
src/doc/guide.md
src/etc/_cargo
src/etc/cargo.bashcomp.sh
tests/new.rs