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.
This commit is contained in:
Eric Ratliff
2026-02-02 19:14:50 -06:00
parent 0431425f38
commit 60679e097f
42 changed files with 5521 additions and 82 deletions

View File

@@ -56,6 +56,7 @@ which = "7.0"
# Colors
colored = "2.1"
chrono = "0.4.43"
[dev-dependencies]
tempfile = "3.13"
@@ -86,4 +87,4 @@ strip = true
[features]
default = []
embedded-gradle = [] # Embed gradle-wrapper.jar in binary (run download-gradle-wrapper.sh first)
embedded-gradle = [] # Embed gradle-wrapper.jar in binary (run download-gradle-wrapper.sh first)