pub fn infer_config(source_dir: &Path) -> Result<InferredConfig, CodegenError>Expand description
Walk source_dir and infer a plumb_core::Config from the
design-token sources it finds.
The walker is bounded by MAX_WALK_DEPTH and skips
node_modules, target, dist, build, .next, out, and any
dotfile directory.
ยงErrors
CodegenError::NotFoundifsource_dirdoes not exist.CodegenError::NotADirectoryifsource_diris not a directory.CodegenError::Ioif a directory entry cannot be read.CodegenError::Sourceif a discovered token source fails to parse. Parse errors carry the source span viaplumb_config::ConfigError.