mighty_repo(): Create a component repo from a spec.mighty_repo_class: Abstract parent class of all component repos. It has no properties and cannot be created directly.
Specs have the form type::path. Supported types:
local: A local directory, e.g.local::inst/examples. A spec without a prefix is treated as local.github: A GitHub repository, e.g.github::owner/repo/subdir@ref. Seemighty_repo_github().url: Raw files under a base URL, e.g.url::https://example.com/components. Seemighty_repo_url().
All repo types share one layout. A component name is the file
<name>.R or <name>.mustache, either directly in the repo or in a
directory named after the component (<name>/<name>.R). A name with an
extension only matches that file.
Examples
path <- system.file("examples", package = "mighty.component")
mighty_repo(path)
#> <mighty.component::mighty_repo_local>
#> @ path: chr "/home/runner/work/_temp/Library/mighty.component/examples"
mighty_repo(paste0("local::", path))
#> <mighty.component::mighty_repo_local>
#> @ path: chr "/home/runner/work/_temp/Library/mighty.component/examples"
