generouted

Generated file-based routes for Vite

MIT License

Downloads
140.9K
Stars
1K
Committers
20

Bot releases are hidden (Show)

generouted - v1.15.9

Published by oedotme about 1 year ago

Commits

  • feat: preserve layout ids as partial file path 081d1cc by @oedotme
  • chore: update packages cd9cff3 by @oedotme
  • docs: add react-router route modals example 646711b by @oedotme
  • chore: update packages a92ed20 by @oedotme
  • chore: update packages a28ab1c by @oedotme

Changelog: https://github.com/oedotme/generouted/compare/v1.15.8...v1.15.9

generouted - v1.15.8

Published by oedotme about 1 year ago

Commits

  • feat: constraint return type for solid match hooks b0f9ef0 by @oedotme

Changelog: https://github.com/oedotme/generouted/compare/v1.15.7...v1.15.8

generouted - v1.15.7

Published by oedotme about 1 year ago

Commits

  • feat: support optional splats 7dedc34 by @oedotme closes #120
  • fix: tanstack react router example imports 9357dc7 by @oedotme

Changelog: https://github.com/oedotme/generouted/compare/v1.15.6...v1.15.7

generouted - v1.15.6

Published by oedotme about 1 year ago

Commits

  • chore: update packages 4cf05d6 by @oedotme
  • fix: update import to @tanstack/react-router (#118) a630289 by @KROSF

Changelog: https://github.com/oedotme/generouted/compare/v1.15.5...v1.15.6

generouted - v1.15.5

Published by oedotme about 1 year ago

Commits

  • chore: remove pre-release script 5b82cdf by @oedotme
  • chore: update packages 9e3bf5e by @oedotme
  • chore: move plugins/* to packages/* e0b78a3 by @oedotme
  • docs: update modals usage examples 8451174 by @oedotme

Changelog: https://github.com/oedotme/generouted/compare/v1.15.4...v1.15.5

generouted - v1.15.4

Published by oedotme about 1 year ago

Commits

  • chore: update packages fc37787 by @oedotme
  • fix: update to use lazyRouteComponent (#109) 272eea9 by @aplulu

Changelog: https://github.com/oedotme/generouted/compare/v1.15.3...v1.15.4

generouted - v1.15.3

Published by oedotme about 1 year ago

Commits

  • fix: normalize all plugins listeners pages path fd1d55d by @oedotme
  • fix: normalize path for windows (#108) 83951cc by @agustinbravop
  • docs: reference main docs from integrations readme 99e46df by @oedotme
  • chore: update prettier config f24dd0a by @oedotme

Changelog: https://github.com/oedotme/generouted/compare/v1.15.2...v1.15.3

generouted - v1.15.2

Published by oedotme about 1 year ago

Commits

  • fix: prettier bin path resolving on windows 9644c96 by @oedotme closes #105
  • feat: exclude layout groups from modal path 86355ff by @oedotme
  • chore: update packages 53a67db by @oedotme
  • docs: update custom integration examples links ea4df3a by @oedotme
  • chore: update custom integration examples 378ab9a by @oedotme

Changelog: https://github.com/oedotme/generouted/compare/v1.15.1...v1.15.2

generouted - v1.15.1

Published by oedotme over 1 year ago

Commits

  • feat: update tanstack router plugin and example with latest changes (#100) 9be6274 by @AkshayPathak

Changelog: https://github.com/oedotme/generouted/compare/v1.15.0...v1.15.1

generouted - v1.15.0

Published by oedotme over 1 year ago

Changes

Introduce route-based and app-level Pending component as a Suspense fallback for both @generouted/react-router and @generouted/solid-router

export const Pending = () => <div>Loading...</div>

Breaking change 🚨

For @generouted/solid-router, now the routes tree/object has the src/pages/_app.tsx as the root route and all the routes render as children like the current implement for @generouted/react-router.

You need to make two changes only at src/pages/_app.tsx for this new update:

  • Render an <Outlet /> component from @solidjs/router instead of {props.children}
  • Render the <Modals /> component explicitly, it was included previously at the exported <Routes /> component
// src/pages/_app.tsx

import { Outlet } from '@solidjs/router'
import { Modals } from '@generouted/solid-router'

import { useModals } from '../router'

export default function App() {
  const modals = useModals()

  return (
    <section>
      <header>
        <nav>...</nav>
        <button onClick={() => modals.open('/login')}>Open modal</button>
      </header>

      <main>
        <Outlet />
      </main>

      <Modals />
    </section>
  )
}

Commits

  • feat!: support suspense-based pending component b758e9b by @oedotme

Changelog: https://github.com/oedotme/generouted/compare/v1.14.0...v1.15.0

generouted - v1.14.0

Published by oedotme over 1 year ago

Changes

You can now export an app level error boundary Catch component from src/pages/_app.tsx with the following integrations:

  • @generouted/react-router, @generouted/react-router/lazy
// src/pages/_app.tsx

export const Catch = () => <div>...</div>
  • @generouted/solid-router, @generouted/solid-router/lazy
// src/pages/_app.tsx

export const Catch = (props: { error: Error; reset: () => void }) => <div>...</div>

Breaking changes 🚨

If you're using the generatePreservedRoutes directly from the core functions or through a custom integration you should now access the default export explicitly:

const preservedRoutes = generatePreservedRoutes(PRESERVED)

-const App = preservedRoutes?.['_app'] || Outlet
-const NotFound = preservedRoutes?.['404'] || Fragment
+const App = preservedRoutes?.['_app']?.default || Outlet
+const NotFound = preservedRoutes?.['404']?.default || Fragment

Commits

  • feat!: support _app level catch error boundary 4785f91 by @oedotme

Changelog: https://github.com/oedotme/generouted/compare/v1.13.7...v1.14.0

generouted - v1.13.7

Published by oedotme over 1 year ago

Changes

  • Setup issue template
  • Updated docs structure, content and conventions example
  • Add file-based Catch component with error boundary for Solid integrations
export const Catch = (props: { error: Error; reset: () => void }) => <div>...</div>

Commits

  • chore: update packages d85724d by @oedotme
  • docs: remove src/pages from conventions example table b374b0f by @oedotme
  • docs: update logo size 19d01aa by @oedotme
  • docs: move experimental and deprecated integrations to the bottom 8c034ff by @oedotme
  • docs: update readme structure and content e6e9d07 by @oedotme
  • feat: add catch component w/ error boundary for solid-router a1758bb by @oedotme
  • docs: add simple custom react-router example 5c88344 by @oedotme
  • docs: update react-router custom example path 2b55dc2 by @oedotme
  • chore: setup issue template 6b31a97 by @oedotme

Changelog: https://github.com/oedotme/generouted/compare/v1.13.6...v1.13.7

generouted - v1.13.6

Published by oedotme over 1 year ago

Commits

  • feat: improve react-router components/hooks types 0cf3125 by @oedotme

Changelog: https://github.com/oedotme/generouted/compare/v1.13.5...v1.13.6

generouted - v1.13.5

Published by oedotme over 1 year ago

Commits

  • feat: ensure layout ids are unique dd99427 by @oedotme closes #93
  • chore: update packages 3cc42d5 by @oedotme

Changelog: https://github.com/oedotme/generouted/compare/v1.13.4...v1.13.5

generouted - v1.13.4

Published by oedotme over 1 year ago

Commits

  • fix: forward search and hash to react-router link and navigate (#95) ebbb47f by @az33zy

Changelog: https://github.com/oedotme/generouted/compare/v1.13.3...v1.13.4

generouted - v1.13.3

Published by oedotme over 1 year ago

Commits

  • fix: solid modals hook navigate options be39cfb by @oedotme

Changelog: https://github.com/oedotme/generouted/compare/v1.13.2...v1.13.3

generouted - v1.13.2

Published by oedotme over 1 year ago

Commits

  • fix: location state type at solid modals hook 848e48a by @oedotme

Changelog: https://github.com/oedotme/generouted/compare/v1.13.1...v1.13.2

generouted - v1.13.1

Published by oedotme over 1 year ago

Commits

  • feat: enable prettier cache for faster formatting 591a2b7 by @oedotme

Changelog: https://github.com/oedotme/generouted/compare/v1.13.0...v1.13.1

generouted - v1.13.0

Published by oedotme over 1 year ago

Changes

  • Support option for nested src/pages in nested directory such as client/src/pages or apps/dashboard/src/pages
  • Custom integration full example
  • Auto-format generated router.ts file with prettier by default if prettier is installed

Breaking changes at Vite plugin options

  • source is now an object instead of string to accept both routes and modals patterns
  • output is now the full output file path instead of only file name
// default values when using `generouted()` plugin with no options (recommended)
{
  source: { routes: './src/pages/**/[\\w[-]*.{jsx,tsx}', modals: './src/pages/**/[+]*.{jsx,tsx}' },
  output: './src/router.ts',
  format: true,
}

Commits

  • docs: update custom integration stackblitz link 8988e9c by @oedotme
  • chore: update packages 7fad487 by @oedotme
  • docs: add custom integration example 1e7db9b by @oedotme
  • feat: optionally auto format router.ts with prettier 5bc491a by @oedotme
  • feat: option for nested src/pages as client/src/pages e0a5593 by @oedotme closes #73, #90
  • test: add ignored files to regular routes cases 0c951db by @oedotme
  • test: base cases for core functions 54d5439 by @oedotme
  • chore: build dependencies first with turbo build c0c360c by @oedotme
  • chore: update packages ec99941 by @oedotme
  • test: setup vitest 0267feb by @oedotme

Changelog: https://github.com/oedotme/generouted/compare/v1.12.9...v1.13.0

generouted - v1.12.9

Published by oedotme over 1 year ago

Commits

  • chore: update packages 08a01c5 by @oedotme
  • docs: include code-splitting note about lazy imports 4248b31 by @oedotme

Changelog: https://github.com/oedotme/generouted/compare/v1.12.8...v1.12.9