Skip to content

Commit 6e622fe

Browse files
committed
Generate routes with Promise.all
1 parent c30c4ec commit 6e622fe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

generate-routes.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,5 +168,9 @@ const write = async (data: string, ...path: string[]): Promise<void> => {
168168
}
169169

170170
const routeRootPath = resolve('src', 'lib', 'seam', 'connect', 'routes')
171+
const writeRoute = async (route: Route): Promise<void> =>
172+
{ await write(renderRoute(route), routeRootPath, `${route.namespace}.ts`); }
171173

172-
await write(renderRoute(exampleRoute), routeRootPath, 'workspaces.ts')
174+
const routes = [exampleRoute]
175+
176+
await Promise.all(routes.map(writeRoute))

0 commit comments

Comments
 (0)