(partial: Partial<ProjectConfig>)
| 64 | * `registry` and rely on default paths). |
| 65 | */ |
| 66 | export function normalizeConfig(partial: Partial<ProjectConfig>): ProjectConfig { |
| 67 | return { |
| 68 | $schema: partial.$schema ?? DEFAULT_PROJECT_CONFIG.$schema, |
| 69 | registry: partial.registry ?? DEFAULT_PROJECT_CONFIG.registry, |
| 70 | paths: { |
| 71 | blocks: partial.paths?.blocks ?? DEFAULT_PROJECT_CONFIG.paths.blocks, |
| 72 | components: partial.paths?.components ?? DEFAULT_PROJECT_CONFIG.paths.components, |
| 73 | assets: partial.paths?.assets ?? DEFAULT_PROJECT_CONFIG.paths.assets, |
| 74 | }, |
| 75 | }; |
| 76 | } |
| 77 | |
| 78 | /** Write `hyperframes.json` to a project directory. Overwrites if present. */ |
| 79 | export function writeProjectConfig( |
no outgoing calls
no test coverage detected