MCPcopy Create free account
hub / github.com/DavidHDev/react-bits / filesForVariant

Function filesForVariant

jsrepo.config.ts:82–88  ·  view source on GitHub ↗
(basePath: string, sourceFile: string, styleFile?: string)

Source from the content-addressed store, hash-verified

80 };
81
82 const filesForVariant = (basePath: string, sourceFile: string, styleFile?: string) =>
83 title === 'Lanyard'
84 ? [
85 ...(styleFile ? [{ path: `${basePath}/${styleFile}` }] : []),
86 { path: `${basePath}/${sourceFile}` }
87 ]
88 : [{ path: basePath }];
89
90 // this might warrant a bit of explanation
91 // basically we check if the variant is included in the variants array and if so we return the item as part of an array

Callers 1

defineComponentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected