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

Function getBaseUrl

packages/dev/s2-docs/scripts/generateMarkdownDocs.mjs:31–39  ·  view source on GitHub ↗
(library)

Source from the content-addressed store, hash-verified

29};
30
31function getBaseUrl(library) {
32 let env = process.env.DOCS_ENV;
33 let base = env ? BASE_URL[env][library] : `http://localhost:1234/${library}`;
34 let publicUrl = process.env.PUBLIC_URL;
35 if (publicUrl) {
36 base += publicUrl.replace(/\/$/, '');
37 }
38 return base;
39}
40
41const __dirname = path.dirname(fileURLToPath(import.meta.url));
42const REPO_ROOT = path.resolve(__dirname, '../../../../');

Callers 1

resolveSchemeUrlFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected