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

Method find

src/loader.ts:125–127  ·  view source on GitHub ↗

* Finds the loader for the specified target path, relative to the source * root, if the loader exists. If there is no such loader, returns undefined. * For files within archives, we find the first parent folder that exists, but * abort if we find a matching folder or reach the source root;

(path: string)

Source from the content-addressed store, hash-verified

123 * if src/data exists, we won’t look for a src/data.zip.
124 */
125 find(path: string): Loader | undefined {
126 return this.findFile(path) ?? this.findArchive(path);
127 }
128
129 // Finding a file:
130 // - /path/to/file.csv

Callers 15

findPageMethod · 0.95
getWatchPathMethod · 0.95
getSourceFilePathMethod · 0.95
getOutputFilePathMethod · 0.95
indexFunction · 0.80
loader-test.tsFile · 0.80
handlePostProjectMethod · 0.80
rewriteHtmlFunction · 0.80
promptDeployTargetFunction · 0.80
findThemeFunction · 0.80

Calls 2

findFileMethod · 0.95
findArchiveMethod · 0.95

Tested by

no test coverage detected