New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More โ†’
Socket
Sign inDemoInstall
Socket

generouted

Package Overview
Dependencies
Maintainers
1
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generouted - npm Package Compare versions

Comparing version 1.10.0 to 1.11.0

2

package.json
{
"name": "generouted",
"version": "1.10.0",
"version": "1.11.0",
"description": "Generated client-side file-based routes for Vite",

@@ -5,0 +5,0 @@ "author": "Omar Elhawary <oedotme@gmail.com> (https://omarelhawary.me)",

@@ -43,3 +43,3 @@ <br>

- React with [TanStack's React Location](https://react-location.tanstack.com)
- Solid with [Solid Router](https://github.com/solidjs/solid-router)
- Solid with [Solid Router w/ type-safe navigation ๐Ÿ†•](https://github.com/solidjs/solid-router)

@@ -111,5 +111,5 @@ ## Getting started

### Solid Router
### Solid Router w/ type-safe navigation ๐Ÿ†•
If you're using Solid, check out their [getting started guide](https://www.solidjs.com/guides/getting-started#try-solid) to start a new project.
In case you don't have a Vite project with Solid and TypeScript, check out this [getting started guide](https://www.solidjs.com/guides/getting-started#try-solid) to start a new project.

@@ -119,5 +119,20 @@ #### Installation

```shell
pnpm add generouted @solidjs/router
pnpm add @generouted/solid-router generouted @solidjs/router
```
- `generouted` provides the file-based routes
- `@generouted/solid-router` optional but recommended plugin to generates types and type-safe router component/hooks
#### Setup
```ts
// vite.config.ts
import { defineConfig } from 'vite'
import solid from 'vite-plugin-solid'
import generouted from '@generouted/solid-router'
export default defineConfig({ plugins: [solid(), generouted()] })
```
#### Usage

@@ -134,2 +149,4 @@

๐Ÿš€ Check more about type-safe navigation and global modals [in the plugin docs](./plugins/solid-router).
### Adding pages

@@ -304,3 +321,3 @@

- [Nested layouts](./examples/react-router/nested-layouts)
- [Plugin w/ type-safe navigation](./examples/react-router/plugin) ๐Ÿ†•
- [w/ type-safe navigation plugin](./examples/react-router/plugin) ๐Ÿ†•

@@ -320,3 +337,3 @@ ### TanStack React Router ๐Ÿ†•

- [Basic](./examples/solid-router/basic)
- [w/ type-safe navigation plugin](./examples/solid-router)

@@ -323,0 +340,0 @@ <br>

@@ -6,3 +6,3 @@ export const patterns = {

slash: [/^index$|\./g, '/'],
optional: [/^-(:?[\w-]+)/g, '$1?'],
optional: [/^-(:?[\w-]+)/, '$1?'],
} as const

@@ -33,3 +33,2 @@

.replace(...patterns.param)
.replace(...patterns.optional)
.split('/')

@@ -39,3 +38,3 @@ .filter(Boolean)

segments.reduce((parent, segment, index) => {
const path = segment.replace(...patterns.slash)
const path = segment.replace(...patterns.slash).replace(...patterns.optional)
const root = index === 0

@@ -42,0 +41,0 @@ const leaf = index === segments.length - 1 && segments.length > 1

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with โšก๏ธ by Socket Inc