Routisan is Retired
But it’s far from dead. I’m rebuilding it in TypeScript, and will be releasing it under a new name soon.
#Vue — 1 April 2023
Back in 2020, I took over the Routisan project, with the idea that it could be brought back to life and maintained.
However, at the time, I was not very good at building JavaScript libraries, and landed up writing some rather iffy code that didn’t self document and didn’t quite match up to the API I wanted to see (largely for the sake of backwards compatibility).
But, this year, after having jumped ship to TypeScript and having come to really like the composition API that Vue now provides, I thought it might be a good idea to rebuild the package from scratch and make it feel more at home in a Vue app, but without discarding the underlying idea of the package, which has always been to bring Laravel-style routing to Vue.
I’ve now written most of the new package in TypeScript (built with Vite in library mode), complete with tests (powered by Vitest), and am currently looking to add new features, such as file-splitting, before releasing it under it’s new name, which I’ll announce when ready.
For now, Routisan is retired, and will be fully archived when the new package is released.
Here’s a small sneak-peek at the new API:
import { createRouter } from 'vue-router'import { createRouteFactory, compileRoutes } from 'secret-package-name' import Dashboard from '@/views'import ProfileContainer from '@/views'import ProfileOverview from '@/views'import ProfilePreferences from '@/views' const { route, group, compileRoutes } = createRouteFactory() group('/').guard('auth').routes(() => { route('/', Dashboard) route('profile', ProfileContainer).name('profile').children(() => { route('/', ProfileOverview).name('overview') route('preferences', ProfilePreferences).name('preferences') })}) export const router = createRouter({ history: createWebHistory(), routes: compileRoutes()})