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

Function getExampleFiles

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

Source from the content-addressed store, hash-verified

366}
367
368function getExampleFiles(file: string, contents: string, type: string | undefined): DownloadFiles {
369 let npmDeps = {};
370 let urls = {};
371 let fileDeps = parseFile(file, contents, npmDeps, urls);
372 let {files} = getFiles([...fileDeps], type, npmDeps);
373 return {files, deps: npmDeps, urls};
374}
375
376let packageVersionCache = new Map<string, string>();
377function getPackageVersion(pkg: string) {

Callers 1

CodeBlockFunction · 0.70

Calls 2

parseFileFunction · 0.85
getFilesFunction · 0.70

Tested by

no test coverage detected