1.1.2 • Published 3 years ago

@egoist/fs-routes v1.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

💛 You can help the author become a full-time open-source maintainer by sponsoring him on GitHub.


@egoist/fs-routes

npm version codecov

This is a utility extracted from SvelteKit, basically it loads routes from a specific directory, with layouts support.

Install

npm i @egoist/fs-routes

Usage

import { loadRoutes } from '@egoist/fs-routes'

const { routes, components } = await loadRoutes({
  routes_dir: './src/routes',
  cwd: process.cwd(), // optional
  page_extensions: [],
  match_api: (file) => file.endsWith('.ts'),
})

License

MIT © EGOIST x SvelteKit authors

1.1.1

3 years ago

1.1.0

3 years ago

1.1.2

3 years ago

1.0.0

3 years ago