( path: string, packageManager: PackageManager )
| 57 | const frameworks: Framework[] = [new NextJs(), new Remix(), new Astro(), new Express(), new Hono()]; |
| 58 | |
| 59 | export const getFramework = async ( |
| 60 | path: string, |
| 61 | packageManager: PackageManager |
| 62 | ): Promise<Framework | undefined> => { |
| 63 | for (const framework of frameworks) { |
| 64 | if (await framework.isMatch(path, packageManager)) { |
| 65 | return framework; |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | return; |
| 70 | }; |
| 71 | |
| 72 | export function frameworkNames() { |
| 73 | return frameworks.map((f) => f.name).join(", "); |
no test coverage detected
searching dependent graphs…