Standard components for the mighty framework.
mighty.standards/
├── components/
│ └── {name}/
│ ├── {name}.mustache
│ └── test-{name}.R
├── DESCRIPTION
└── .github/
├── ISSUE_TEMPLATE/
├── pull_request_template.md
└── workflows/
components/— each component lives in its own directory containing a mustache template and a test file.DESCRIPTION— infrastructure dependencies (covr,testthat,mighty.component) go underSuggests. Packages used in component code go underImports..github/— issue templates, PR template, and CI workflows.
The test-components workflow runs on:
- Push and PR to
main - Push and PR to
dev/**branches (for staging draft components)
Install dependencies:
pak::pak()Run all component tests:
dirs <- list.dirs("components", recursive = FALSE)
lapply(dirs, testthat::test_dir, stop_on_failure = TRUE)Run tests for a single component:
testthat::test_dir("components/dummy")