generated from stijnvanhulle/template
-
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/supportMultiLanguages
- Loading branch information
Showing
332 changed files
with
2,826 additions
and
2,655 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,13 +19,13 @@ | |
"serve": "vitepress serve" | ||
}, | ||
"dependencies": { | ||
"@vercel/analytics": "^1.1.2", | ||
"@vercel/analytics": "^1.2.1", | ||
"sitemap": "^7.1.1", | ||
"vitepress": "^1.0.0-rc.41", | ||
"vue": "^3.4.15" | ||
"vitepress": "^1.0.0-rc.44", | ||
"vue": "^3.4.19" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^20.11.16" | ||
"@types/node": "^20.11.19" | ||
}, | ||
"packageManager": "[email protected]", | ||
"engines": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,186 @@ | ||
--- | ||
layout: doc | ||
|
||
title: unplugin-kubb | ||
outline: deep | ||
--- | ||
|
||
# unplugin-kubb <a href="https://paka.dev/npm/unplugin-kubb@latest/api">🦙</a> | ||
|
||
Kubb plugin for Vite, webpack, esbuild, Rollup, Nuxt, Astro and Rspack. | ||
|
||
## Installation | ||
|
||
::: code-group | ||
|
||
```shell [bun <img src="/feature/bun.svg"/>] | ||
bun add unplugin-kubb @kubb/core | ||
``` | ||
|
||
```shell [pnpm <img src="/feature/pnpm.svg"/>] | ||
pnpm add unplugin-kubb @kubb/core | ||
``` | ||
|
||
```shell [npm <img src="/feature/npm.svg"/>] | ||
npm install unplugin-kubb @kubb/core | ||
``` | ||
|
||
```shell [yarn <img src="/feature/yarn.svg"/>] | ||
yarn add unplugin-kubb @kubb/core | ||
``` | ||
|
||
::: | ||
|
||
## Options | ||
|
||
### config | ||
|
||
Define the options for Kubb. | ||
|
||
::: info type | ||
|
||
```typescript [Options] | ||
type Options = { | ||
config: UserConfig | ||
} | ||
``` | ||
::: | ||
::: info | ||
Type: `Options` <br/> | ||
::: code-group | ||
```typescript [kubb.config.ts] | ||
import { defineConfig } from '@kubb/core' | ||
import createSwagger from '@kubb/swagger' | ||
import createSwaggerTanstackQuery from '@kubb/swagger-tanstack-query' | ||
import createSwaggerTS from '@kubb/swagger-ts' | ||
|
||
/** @type {import('@kubb/core').UserConfig} */ | ||
export const config = { | ||
root: '.', | ||
input: { | ||
path: './petStore.yaml', | ||
}, | ||
output: { | ||
path: './src/gen', | ||
clean: true, | ||
}, | ||
plugins: [ | ||
createSwagger({ output: false }), | ||
createSwaggerTS({ | ||
output: { | ||
path: 'models', | ||
}, | ||
}), | ||
], | ||
} | ||
``` | ||
|
||
```typescript [vite.config.ts] | ||
import react from '@vitejs/plugin-react' | ||
import kubb from 'unplugin-kubb/vite' | ||
import { defineConfig } from 'vite' | ||
import { config } from './kubb.config' | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [ | ||
react(), | ||
kubb({ | ||
config, | ||
}), | ||
], | ||
}) | ||
``` | ||
|
||
::: | ||
|
||
## Examples | ||
|
||
### Vite | ||
|
||
```ts | ||
// vite.config.ts | ||
import Plugin from 'unplugin-kubb/vite' | ||
|
||
export default defineConfig({ | ||
plugins: [ | ||
Plugin({/* options */}), | ||
], | ||
}) | ||
``` | ||
|
||
### Rollup | ||
|
||
```ts | ||
// rollup.config.js | ||
import Plugin from 'unplugin-kubb/rollup' | ||
|
||
export default { | ||
plugins: [ | ||
Plugin({/* options */}), | ||
], | ||
} | ||
``` | ||
|
||
### webpack | ||
|
||
```ts | ||
// webpack.config.js | ||
module.exports = { | ||
/* ... */ | ||
plugins: [ | ||
require('unplugin-kubb/webpack')({/* options */}), | ||
], | ||
} | ||
``` | ||
|
||
### Nuxt | ||
|
||
```ts | ||
// nuxt.config.js | ||
export default defineNuxtConfig({ | ||
modules: [ | ||
['unplugin-kubb/nuxt', {/* options */}], | ||
], | ||
}) | ||
``` | ||
|
||
> This module works for both Nuxt 2 and [Nuxt Vite](https://github.com/nuxt/vite) | ||
### Vue CLI | ||
|
||
```ts | ||
// vue.config.js | ||
module.exports = { | ||
configureWebpack: { | ||
plugins: [ | ||
require('unplugin-kubb/webpack')({/* options */}), | ||
], | ||
}, | ||
} | ||
``` | ||
|
||
### esbuild | ||
|
||
```ts | ||
// esbuild.config.js | ||
import { build } from 'esbuild' | ||
import Plugin from 'unplugin-kubb/esbuild' | ||
|
||
build({ | ||
plugins: [Plugin()], | ||
}) | ||
``` | ||
|
||
## Depended | ||
|
||
- [`@kubb/core`](/plugins/core/) | ||
|
||
## Links | ||
|
||
- [Vite](https://vitejs.dev/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ | |
"typecheck": "tsc -p ./tsconfig.json --noEmit --emitDeclarationOnly false" | ||
}, | ||
"dependencies": { | ||
"@faker-js/faker": "^8.4.0", | ||
"@faker-js/faker": "^8.4.1", | ||
"@kubb/cli": "workspace:*", | ||
"@kubb/core": "workspace:*", | ||
"@kubb/swagger": "workspace:*", | ||
|
@@ -32,25 +32,25 @@ | |
"@kubb/swagger-ts": "workspace:*", | ||
"@kubb/swagger-zod": "workspace:*", | ||
"@kubb/swagger-zodios": "workspace:*", | ||
"@tanstack/react-query": "^5.18.1", | ||
"@tanstack/solid-query": "^5.18.1", | ||
"@tanstack/svelte-query": "^5.18.1", | ||
"@tanstack/vue-query": "^5.18.1", | ||
"@tanstack/react-query": "^5.21.7", | ||
"@tanstack/solid-query": "^5.21.7", | ||
"@tanstack/svelte-query": "^5.21.7", | ||
"@tanstack/vue-query": "^5.21.7", | ||
"@zodios/core": "^10.9.6", | ||
"axios": "^1.6.7", | ||
"msw": "^1.3.2", | ||
"react": "^18.2.0", | ||
"solid-js": "^1.8.12", | ||
"solid-js": "^1.8.15", | ||
"svelte": "^3.59.2", | ||
"swr": "^2.2.4", | ||
"tsup": "^8.0.1", | ||
"vue": "^3.4.15", | ||
"swr": "^2.2.5", | ||
"tsup": "^8.0.2", | ||
"vue": "^3.4.19", | ||
"zod": "^3.22.4" | ||
}, | ||
"devDependencies": { | ||
"@kubb/ts-config": "workspace:*", | ||
"@kubb/tsup-config": "workspace:*", | ||
"tsup": "^8.0.1", | ||
"tsup": "^8.0.2", | ||
"typescript": "~5.2.2" | ||
}, | ||
"packageManager": "[email protected]", | ||
|
Oops, something went wrong.