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

Function getExampleFiles

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

Source from the content-addressed store, hash-verified

397}
398
399function getExampleFiles(file: string, contents: string, type: string | undefined): DownloadFiles {
400 let npmDeps = {};
401 let urls = {};
402 let fileDeps = parseFile(file, contents, npmDeps, urls);
403 let {files} = getFiles([...fileDeps], type, npmDeps);
404 return {files, deps: npmDeps, urls};
405}
406
407let packageVersionCache = new Map<string, string>();
408function getPackageVersion(pkg: string) {

Callers 1

CodeBlockFunction · 0.70

Calls 2

parseFileFunction · 0.85
getFilesFunction · 0.70

Tested by

no test coverage detected