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

Method getOutputFilePath

src/loader.ts:277–283  ·  view source on GitHub ↗

* Returns the path to the backing file during build, relative to the source * root, which is the cached output file if the file is generated by a loader.

(path: string)

Source from the content-addressed store, hash-verified

275 * root, which is the cached output file if the file is generated by a loader.
276 */
277 private getOutputFilePath(path: string): string {
278 if (!existsSync(join(this.root, path))) {
279 const loader = this.find(path);
280 if (loader) return join(".observablehq", "cache", path);
281 }
282 return path;
283 }
284
285 /**
286 * Returns the hash of the file with the given name within the source root, or

Callers 1

getOutputInfoMethod · 0.95

Calls 2

findMethod · 0.95
existsSyncFunction · 0.85

Tested by

no test coverage detected