Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jycouet committed Dec 28, 2024
1 parent f58f9f5 commit 1ad60f6
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 19 deletions.
5 changes: 5 additions & 0 deletions .changeset/forty-plants-tease.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'vite-plugin-kit-routes': patch
---

readme update links
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ standalone libraries._
| [vite-plugin-stripper](./packages/vite-plugin-stripper/README.md) | [![](https://img.shields.io/npm/v/vite-plugin-stripper?color=&logo=npm)](https://www.npmjs.com/package/vite-plugin-stripper) | [![](https://img.shields.io/npm/dm/vite-plugin-stripper?&logo=npm)](https://www.npmjs.com/package/vite-plugin-stripper) |
| [@kitql/handles](./packages/handles/README.md) | [![](https://img.shields.io/npm/v/@kitql/handles?color=&logo=npm)](https://www.npmjs.com/package/@kitql/handles) | [![](https://img.shields.io/npm/dm/@kitql/handles?&logo=npm)](https://www.npmjs.com/package/@kitql/handles) |
| [@kitql/internals](./packages/internals/README.md) | [![](https://img.shields.io/npm/v/@kitql/internals?color=&logo=npm)](https://www.npmjs.com/package/@kitql/internals) | [![](https://img.shields.io/npm/dm/@kitql/internals?&logo=npm)](https://www.npmjs.com/package/@kitql/internals) |
| [create-kitql](./packages/create-kitql/README.md) | [![](https://img.shields.io/npm/v/create-kitql?color=&logo=npm)](https://www.npmjs.com/package/create-kitql) | [![](https://img.shields.io/npm/dm/create-kitql?&logo=npm)](https://www.npmjs.com/package/create-kitql) |

_\*Order by subjective usefulness_ 😉

Expand All @@ -38,7 +37,9 @@ _\*Order by subjective usefulness_ 😉
## ✨ Contributors

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->

[![All Contributors](https://img.shields.io/badge/all_contributors-43-orange.svg?style=flat-square)](#contributors-)

<!-- ALL-CONTRIBUTORS-BADGE:END -->

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Expand Down
36 changes: 31 additions & 5 deletions packages/vite-plugin-kit-routes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,39 @@

[![](https://img.shields.io/badge/Documentation%20of-vite%20plugin%20kit%20routes-FF3E00.svg?style=flat&logo=stackblitz&logoColor=FF3E00)](https://kitql.dev/docs/tools/06_vite-plugin-kit-routes)

## 🧑‍💻 Demo
## ⚡️ Quick start

### 🌐 Online
### Install

[![](https://img.shields.io/badge/Open_in-SvelteLab-black?logo=svelte&color=%23FF3E00)](https://www.sveltelab.dev/?provider=github&owner=jycouet&repo=kitql&branch=main&path=%2Fpackages%2Fcreate-kitql%2Ftemplates%2Fkit-routes)
[![](https://img.shields.io/badge/Open_in-CodeSandbox-black?logo=codesandbox&color=%23151515)](https://codesandbox.io/p/sandbox/github/jycouet/kitql/tree/main/packages/create-kitql/templates/kit-routes)
[![](https://img.shields.io/badge/Open_in-StackBlitz-black?logo=stackblitz&color=%231269D3)](https://stackblitz.com/github.com/jycouet/kitql/tree/main/packages/create-kitql/templates/kit-routes)
```bash
npm i -D vite-plugin-kit-routes
```

### Add to your Vite config

```js
import { sveltekit } from '@sveltejs/kit/vite'
import { kitRoutes } from 'vite-plugin-kit-routes'

/** @type {import('vite').UserConfig} */
export default config = {
plugins: [
sveltekit(),
// ✅ Add the plugin
kitRoutes()
]
}
```

## Use

```html
<script lang="ts">
import { route } from '$lib/ROUTES'
</script>

<a href={route('/about')}>About</a>
```

## ⭐️ Join us

Expand Down
2 changes: 0 additions & 2 deletions website/src/pages/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ You have some general questions? We have some answers! 🤞 check out our [F.A.Q

- For everywhere

-[@kitql/create-kitql](/docs/create) - Create a new project in seconds _(various templates
available)_
- ⚡️ [@kitql/helpers](/docs/tools/04_helpers) - 0️⃣ dep, 🪶 lightweight helpers for `logs`,
`sleep`, `JSON`, ...

Expand Down
12 changes: 1 addition & 11 deletions website/src/pages/docs/tools/06_vite-plugin-kit-routes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,6 @@ npm i -D vite-plugin-kit-routes
npm create kitql@latest --template kit-routes
```

### Online

[![](https://img.shields.io/badge/Open_in-SvelteLab-black?logo=svelte&color=%23FF3E00)](https://www.sveltelab.dev/?provider=github&owner=jycouet&repo=kitql&branch=main&path=%2Fpackages%2Fcreate-kitql%2Ftemplates%2Fkit-routes)

[![](https://img.shields.io/badge/Open_in-CodeSandbox-black?logo=codesandbox&color=%23151515)](https://codesandbox.io/p/sandbox/github/jycouet/kitql/tree/main/packages/create-kitql/templates/kit-routes)

[![](https://img.shields.io/badge/Open_in-StackBlitz-black?logo=stackblitz&color=%231269D3)](https://stackblitz.com/github.com/jycouet/kitql/tree/main/packages/create-kitql/templates/kit-routes)

## Configuration

Add the plugin like this:
Expand All @@ -142,15 +134,13 @@ import { sveltekit } from '@sveltejs/kit/vite'
import { kitRoutes } from 'vite-plugin-kit-routes'

/** @type {import('vite').UserConfig} */
const config = {
export default config = {
plugins: [
sveltekit(),
// ✅ Add the plugin
kitRoutes()
]
}

export default config
```

It will generate a file `./src/lib/ROUTES.ts` at the start of your dev server & any update of any of
Expand Down

0 comments on commit 1ad60f6

Please sign in to comment.