MCPcopy Create free account
hub / github.com/adobe/react-spectrum / getExampleFiles

Function getExampleFiles

packages/dev/s2-docs/src/CodeBlock.tsx:392–398  ·  view source on GitHub ↗
(file: string, contents: string, type: string | undefined)

Source from the content-addressed store, hash-verified

390}
391
392function getExampleFiles(file: string, contents: string, type: string | undefined): DownloadFiles {
393 let npmDeps = {};
394 let urls = {};
395 let fileDeps = parseFile(file, contents, npmDeps, urls);
396 let {files} = getFiles([...fileDeps], type, npmDeps);
397 return {files, deps: npmDeps, urls};
398}
399
400let packageVersionCache = new Map<string, string>();
401function getPackageVersion(pkg: string) {

Callers 1

CodeBlockFunction · 0.70

Calls 2

parseFileFunction · 0.85
getFilesFunction · 0.70

Tested by

no test coverage detected