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

Function resolve

packages/dev/parcel-transformer-mdx-docs/processCSS.js:33–46  ·  view source on GitHub ↗
(specifier, parent)

Source from the content-addressed store, hash-verified

31 },
32 resolver: {
33 resolve(specifier, parent) {
34 if (specifier.startsWith('.')) {
35 return path.resolve(path.dirname(parent), specifier);
36 }
37
38 if (path.extname(specifier) === '') {
39 // Assume this is a package.
40 specifier += '/src/index.css';
41 return require.resolve(specifier);
42 }
43
44 let baseDir = process.env.DOCS_ENV === 'production' ? 'docs' : 'packages';
45 return path.resolve(options.projectRoot, baseDir, specifier);
46 },
47 read(filePath) {
48 if (filePath === `${asset.filePath}.lightning`) {
49 return cssCode.join('\n');

Callers 2

createServiceFunction · 0.50
createClientFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected