MCPcopy Create free account
hub / github.com/observablehq/framework / importConfig

Function importConfig

src/config.ts:189–192  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

187// By using the modification time of the config, we ensure that we pick up any
188// changes to the config on reload.
189async function importConfig(path: string): Promise<ConfigSpec> {
190 const {mtimeMs} = await stat(path);
191 return (await import(`${pathToFileURL(path).href}?${mtimeMs}`)).default;
192}
193
194export async function readConfig(configPath?: string, root?: string): Promise<Config> {
195 if (configPath === undefined) configPath = await resolveDefaultConfig(root);

Callers 1

readConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected