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

Function getExampleFiles

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

Source from the content-addressed store, hash-verified

382}
383
384function getExampleFiles(file: string, contents: string, type: string | undefined): DownloadFiles {
385 let npmDeps = {};
386 let urls = {};
387 let fileDeps = parseFile(file, contents, npmDeps, urls);
388 let {files} = getFiles([...fileDeps], type, npmDeps);
389 return {files, deps: npmDeps, urls};
390}
391
392let packageVersionCache = new Map<string, string>();
393function getPackageVersion(pkg: string) {

Callers 1

CodeBlockFunction · 0.70

Calls 2

parseFileFunction · 0.85
getFilesFunction · 0.70

Tested by

no test coverage detected