jycouet / kitql

A set of standalone tools to SpeedRun WebApps!
https://kitql.dev
MIT License
401 stars 37 forks source link

feat: exporting AllRoutes set from generated ROUTES.ts #676

Closed duducpp closed 1 month ago

duducpp commented 1 month ago

This allows users to access all routes generated through a Set.

https://github.com/jycouet/kitql/blob/e8a99d4d949462c2cdc52b30f1e229c416f17d32/packages/vite-plugin-kit-routes/src/lib/format.ts#L87-L88

Result:

// type AllRoutes
"/" | "/route1" | "/route2/[alias]"

// const allRoutes
["/", "/route1", "/route2/[alias]"]
jycouet commented 1 month ago

Looks good to me thx.

I don't have access to a laptop RN, I'll look at it next week. Hope it's ok for you.

nx-cloud[bot] commented 1 month ago

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 1c4ad59a2290e3ced6f11ccad95663e3e838a9dd. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 2 targets - [`nx run-many --target=build,lint,test:ci --exclude=create-kitql-*`](https://cloud.nx.app/runs/CDJ1NaZEoP?utm_source=pull-request&utm_medium=comment) - [`nx run-many --target=build --exclude=create-kitql-*`](https://cloud.nx.app/runs/1YC0aCkEUV?utm_source=pull-request&utm_medium=comment)

Sent with 💌 from NxCloud.

jycouet commented 1 month ago

@all-contributors please add @duducpp for code

allcontributors[bot] commented 1 month ago

@jycouet

I've put up a pull request to add @duducpp! :tada: