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

Function getPagePaths

packages/dev/s2-docs/scripts/testAccessibility.mjs:137–149  ·  view source on GitHub ↗
(library)

Source from the content-addressed store, hash-verified

135
136// Get all MDX page paths
137async function getPagePaths(library) {
138 const patterns = [];
139
140 if (library === 'all' || library === 's2') {
141 patterns.push('s2/**/*.mdx');
142 }
143 if (library === 'all' || library === 'react-aria') {
144 patterns.push('react-aria/**/*.mdx');
145 }
146
147 const files = await glob(patterns, {cwd: pagesDir});
148 return files;
149}
150
151// Convert MDX file path to URL path
152function mdxToUrl(mdxPath, options) {

Callers 1

testAccessibilityFunction · 0.85

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected