use super::{Template, TemplateFile};
const SCRIPTS_TOML: &str = r#"# Generated by `cargo script init --template rust-project`
[global_env]
RUST_BACKTRACE = "1"
[scripts]
dev = "cargo run"
build = "cargo build"
release = "cargo build --release"
test = "cargo test"
fmt = "cargo fmt --all"
lint = "cargo clippy --all-targets -- -D warnings"
doc = "cargo doc --no-deps --open"
check = { include = ["fmt", "lint", "test"], info = "Quick local pre-push check" }
# Hooks example: clean target/ on failure
clean-on-failure = { command = "cargo clean", info = "Recover from a broken build" }
# Watch example (requires the `watch` feature):
# cargo script test --watch
"#;
pub const TEMPLATE: Template = Template {
name: "rust-project",
description: "Sensible defaults for a single-crate Rust project",
files: &[TemplateFile { path: "Scripts.toml", contents: SCRIPTS_TOML }],
};