Static Route Paths
Depedency-free static route builder that can be used alongside any dynamic routing library to bring sanity to intellisense
Ever had to make a single-page-app where all the route references were strings?
Ever had a silly mistake where you had wasted time due to a typo in those strings?
Have you ever wished you could use intellisense on your route pathings?
This library is for you.
npm install static-route-paths# oryarn add static-route-paths
Using this library is a 2 step process.
1. Define your route tree
In order to have intellisense work, we nede to define the tree
2. Getting the strings
Now we can reference our tree to get the strings for our single-page-app framework or library of choice.
;routes.root.path// => '/'routes.login.path// => '/loginroutes.dashboard.blogs.path// => /dashboard/blogsroutes.dashboard.blogs.show.path// => /dashboard/blogs/:idroutes.dashboard.blogs.show.with;// => /dashboard/blogs/some-blog-id-or-slug