universal-router-typesafe-urls
v1.3.3
Published
URL Generation for Universal Router
Downloads
18
Readme
Universal Router Typesafe URLs
URL Generation for Universal Router.
Installation
npm install universal-router-typesafe-urls
Usage
Run the following command to generate router class in watch mode (useful for development):
npx universal-router-typesafe-urls
Run the following command to generate router class once (useful for CI/CD):
npx universal-router-typesafe-urls --no-watch
Configuration
You can set options in universal-router-typesafe-urls.config for your specific project. Available options:
| key | type | default value |
| ----------------------------------- | -------- | ------------- |
| baseDir | string
| ''
|
| outputClassName | string
| 'Router'
|
| outputClassPath | string
| 'Router.ts'
|
baseDir
Defines which directory is the root to search universal-router definition. It's probably 'src' in most cases.
outputClassName
Defines name of class which will be used by you to generate routing urls.
outputClassPath
Defines path of generated class.