(configPath?: string, root?: string)
| 192 | } |
| 193 | |
| 194 | export async function readConfig(configPath?: string, root?: string): Promise<Config> { |
| 195 | if (configPath === undefined) configPath = await resolveDefaultConfig(root); |
| 196 | if (configPath === undefined) return normalizeConfig(undefined, root); |
| 197 | return normalizeConfig(await importConfig(configPath), root, configPath); |
| 198 | } |
| 199 | |
| 200 | async function resolveDefaultConfig(root?: string): Promise<string | undefined> { |
| 201 | const jsPath = resolveConfig("observablehq.config.js", root); |
no test coverage detected