(props: Props)
| 11 | } |
| 12 | |
| 13 | export const getComponentExampleSourceCode = async (props: Props) => { |
| 14 | const { component, example, framework } = props |
| 15 | |
| 16 | const baseDir = join(process.cwd(), '../components') |
| 17 | const lang = 'tsx' |
| 18 | |
| 19 | const fileName = `${example}.${lang}` |
| 20 | const path = join(baseDir, framework, 'src/examples', component, fileName) |
| 21 | const code = await readFile(path, 'utf-8').catch(() => null) |
| 22 | |
| 23 | return code |
| 24 | } |
no outgoing calls
no test coverage detected