Function
filesForVariant
(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 |
Tested by
no test coverage detected