Files
weevil/Cargo.toml
Eric Ratliff 60679e097f feat: Add template system to weevil new command
Implements template-based project creation allowing teams to start with
professional example code instead of empty projects.

Features:
- Two templates: 'basic' (minimal) and 'testing' (45-test showcase)
- Template variable substitution ({{PROJECT_NAME}}, etc.)
- Template validation with helpful error messages
- `weevil new --list-templates` command
- Template files embedded in binary at compile time

Technical details:
- Templates stored in templates/basic/ and templates/testing/
- Files ending in .template have variables replaced
- Uses include_dir! macro to embed templates in binary
- Returns file count for user feedback

Testing template includes:
- 3 complete subsystems (MotorCycler, WallApproach, TurnController)
- Hardware abstraction layer with mock implementations
- 45 comprehensive tests (unit, integration, system)
- Professional documentation (DESIGN_AND_TEST_PLAN.md, etc.)

Usage:
  weevil new my-robot                    # basic template
  weevil new my-robot --template testing # testing showcase
  weevil new --list-templates            # show available templates

This enables FTC teams to learn from working code and best practices
rather than starting from scratch.
2026-02-02 22:31:08 -06:00

91 lines
1.9 KiB
TOML

[package]
name = "weevil"
version = "1.1.0-beta.2"
edition = "2021"
authors = ["Eric Ratliff <eric@nxlearn.net>"]
description = "FTC robotics project generator - bores into complexity, emerges with clean code"
license = "MIT"
[lib]
name = "weevil"
path = "src/lib.rs"
[[bin]]
name = "weevil"
path = "src/main.rs"
[dependencies]
# CLI framework - beautiful help, subcommands, validation
clap = { version = "4.5", features = ["derive", "cargo"] }
# Filesystem and paths
walkdir = "2.5"
tempfile = "3.13"
dirs = "5.0"
# Templates
tera = "1.20"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
toml = "0.8"
# Embedded resources
include_dir = "0.7"
# Downloads
reqwest = { version = "0.12", features = ["blocking", "stream"] }
tokio = { version = "1.42", features = ["full"] }
# Progress bars
indicatif = "0.17"
# Archive handling
zip = "2.2"
flate2 = "1.0"
tar = "0.4"
# Error handling
anyhow = "1.0"
thiserror = "1.0"
# Git operations
git2 = "0.19"
# Process execution
which = "7.0"
# Colors
colored = "2.1"
chrono = "0.4.43"
[dev-dependencies]
tempfile = "3.13"
assert_cmd = "2.0"
predicates = "3.1"
insta = "1.41"
# Proxy integration tests: mockito is the mock origin server; hyper + friends
# are the forward proxy. All three are already in Cargo.lock as transitive
# deps of reqwest — we're just promoting them to explicit dev-deps with the
# features we actually need.
mockito = "1.7"
hyper = { version = "1", features = ["server", "http1", "client"] }
hyper-util = { version = "0.1", features = ["tokio", "client-legacy", "http1"] }
http-body-util = "0.1"
bytes = "1"
tokio = { version = "1", features = ["full"] }
[build-dependencies]
ureq = { version = "2.10", features = ["json"] }
zip = "2.2"
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
strip = true
[features]
default = []
embedded-gradle = [] # Embed gradle-wrapper.jar in binary (run download-gradle-wrapper.sh first)