Skip to content

Commit

Permalink
chore: readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
stijnvanhulle committed Apr 1, 2024
1 parent ae6dfe0 commit 89d865a
Show file tree
Hide file tree
Showing 25 changed files with 108 additions and 364 deletions.
Binary file modified assets/features.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion configs/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ beforeAll(() => {
if (globalThis.Bun) {
/** @type {import('bun:jsc')} */
const jsc = require('bun:jsc')
const http = require('http')
const http = require('node:http')
const source = globalThis.Bun.fileURLToPath(jsc.callerSourceOrigin())
const bunTest = globalThis.Bun.jest(source)

Expand Down
12 changes: 6 additions & 6 deletions docs/plugins/unplugin/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ export default defineConfig({

```ts
// vite.config.ts
import Plugin from 'unplugin-kubb/vite'
import kubb from 'unplugin-kubb/vite'

export default defineConfig({
plugins: [
Plugin({/* options */}),
kubb({/* options */}),
],
})
```
Expand All @@ -118,11 +118,11 @@ export default defineConfig({

```ts
// rollup.config.js
import Plugin from 'unplugin-kubb/rollup'
import kubb from 'unplugin-kubb/rollup'

export default {
plugins: [
Plugin({/* options */}),
kubb({/* options */}),
],
}
```
Expand Down Expand Up @@ -170,10 +170,10 @@ module.exports = {
```ts
// esbuild.config.js
import { build } from 'esbuild'
import Plugin from 'unplugin-kubb/esbuild'
import kubb from 'unplugin-kubb/esbuild'

build({
plugins: [Plugin()],
plugins: [kubb()],
})
```

Expand Down
31 changes: 0 additions & 31 deletions examples/vue-query-v5/kubb.config.js

This file was deleted.

3 changes: 2 additions & 1 deletion examples/vue-query-v5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"build": "vite build",
"clean": "npx rimraf ./dist",
"dev": "vite",
"generate": "kubb generate",
"generate": "vite build",
"start": "tsup --watch",
"test": "vitest",
"typecheck": "tsc -p ./tsconfig.json --noEmit --emitDeclarationOnly false"
Expand All @@ -31,6 +31,7 @@
"@kubb/swagger-zod": "workspace:*",
"@tanstack/vue-query": "^5.28.9",
"axios": "^1.6.8",
"unplugin-kubb": "workspace:*",
"vue": "^3.4.21"
},
"devDependencies": {
Expand Down
36 changes: 35 additions & 1 deletion examples/vue-query-v5/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,43 @@
import { definePlugin as createSwagger } from '@kubb/swagger'
import { definePlugin as createSwaggerTanstackQuery } from '@kubb/swagger-tanstack-query'
import { definePlugin as createSwaggerTS } from '@kubb/swagger-ts'
import vue from '@vitejs/plugin-vue'
import kubb from 'unplugin-kubb/vite'
import { defineConfig } from 'vite'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
plugins: [
vue(),
kubb({
config: {
root: '.',
input: {
path: './petStore.yaml',
},
output: {
path: './src/gen',
clean: true,
},
plugins: [
createSwagger({
output: false,
}),
createSwaggerTS({
output: {
path: 'models',
},
}),
createSwaggerTanstackQuery({
output: {
path: './hooks',
},
framework: 'vue',
}),
],
},
}),
],
optimizeDeps: {
include: ['axios'],
},
Expand Down
16 changes: 2 additions & 14 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@
"name": "@kubb/cli",
"version": "2.12.2",
"description": "Generator cli",
"keywords": [
"typescript",
"plugins",
"kubb",
"codegen",
"cli"
],
"keywords": ["typescript", "plugins", "kubb", "codegen", "cli"],
"repository": {
"type": "git",
"url": "git://github.com/kubb-project/kubb.git",
Expand All @@ -31,13 +25,7 @@
"bin": {
"kubb": "bin/kubb.cjs"
},
"files": [
"src",
"dist",
"bin",
"!/**/**.test.**",
"!/**/__tests__/**"
],
"files": ["src", "dist", "bin", "!/**/**.test.**", "!/**/__tests__/**"],
"scripts": {
"build": "tsup",
"clean": "npx rimraf ./dist",
Expand Down
37 changes: 7 additions & 30 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
"name": "@kubb/core",
"version": "2.12.2",
"description": "Generator core",
"keywords": [
"typescript",
"plugins",
"kubb",
"codegen"
],
"keywords": ["typescript", "plugins", "kubb", "codegen"],
"repository": {
"type": "git",
"url": "git://github.com/kubb-project/kubb.git",
Expand Down Expand Up @@ -59,32 +54,14 @@
"types": "./dist/index.d.ts",
"typesVersions": {
"*": {
"utils": [
"./dist/utils.d.ts"
],
"transformers": [
"./dist/transformers.d.ts"
],
"logger": [
"./dist/logger.d.ts"
],
"fs": [
"./dist/fs.d.ts"
],
"mocks": [
"./dist/mocks.d.ts"
]
"utils": ["./dist/utils.d.ts"],
"transformers": ["./dist/transformers.d.ts"],
"logger": ["./dist/logger.d.ts"],
"fs": ["./dist/fs.d.ts"],
"mocks": ["./dist/mocks.d.ts"]
}
},
"files": [
"src",
"dist",
"*.d.ts",
"*.d.cts",
"schema.json",
"!/**/**.test.**",
"!/**/__tests__/**"
],
"files": ["src", "dist", "*.d.ts", "*.d.cts", "schema.json", "!/**/**.test.**", "!/**/__tests__/**"],
"scripts": {
"build": "tsup",
"clean": "npx rimraf ./dist",
Expand Down
16 changes: 2 additions & 14 deletions packages/kubb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@
"name": "kubb",
"version": "2.0.0-beta.2",
"description": "OpenAPI to TypeScript, React-Query, Zod, Zodios, Faker.js, MSW and Axios.",
"keywords": [
"typescript",
"plugins",
"kubb",
"codegen",
"cli"
],
"keywords": ["typescript", "plugins", "kubb", "codegen", "cli"],
"repository": {
"type": "git",
"url": "git://github.com/kubb-project/kubb.git",
Expand All @@ -24,13 +18,7 @@
"bin": {
"kubb": "bin/kubb.js"
},
"files": [
"src",
"dist",
"bin",
"!/**/**.test.**",
"!/**/__tests__/**"
],
"files": ["src", "dist", "bin", "!/**/**.test.**", "!/**/__tests__/**"],
"scripts": {
"build": "tsup",
"clean": "npx rimraf ./dist",
Expand Down
18 changes: 3 additions & 15 deletions packages/parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
"name": "@kubb/parser",
"version": "2.12.2",
"description": "Generator parser",
"keywords": [
"typescript",
"plugins",
"kubb",
"codegen"
],
"keywords": ["typescript", "plugins", "kubb", "codegen"],
"repository": {
"type": "git",
"url": "git://github.com/kubb-project/kubb.git",
Expand Down Expand Up @@ -36,17 +31,10 @@
"types": "./dist/index.d.cts",
"typesVersions": {
"*": {
"factory": [
"./dist/factory.d.ts"
]
"factory": ["./dist/factory.d.ts"]
}
},
"files": [
"src",
"dist",
"!/**/**.test.**",
"!/**/__tests__/**"
],
"files": ["src", "dist", "!/**/**.test.**", "!/**/__tests__/**"],
"scripts": {
"build": "tsup",
"clean": "npx rimraf ./dist",
Expand Down
24 changes: 4 additions & 20 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
"name": "@kubb/react",
"version": "2.12.2",
"description": "Generator react",
"keywords": [
"typescript",
"plugins",
"kubb",
"codegen"
],
"keywords": ["typescript", "plugins", "kubb", "codegen"],
"repository": {
"type": "git",
"url": "git://github.com/kubb-project/kubb.git",
Expand Down Expand Up @@ -51,22 +46,11 @@
"types": "./dist/index.d.ts",
"typesVersions": {
"*": {
"client": [
"./dist/client.d.ts"
],
"server": [
"./dist/server.d.ts"
]
"client": ["./dist/client.d.ts"],
"server": ["./dist/server.d.ts"]
}
},
"files": [
"src",
"dist",
"*.d.ts",
"*.d.cts",
"!/**/**.test.**",
"!/**/__tests__/**"
],
"files": ["src", "dist", "*.d.ts", "*.d.cts", "!/**/**.test.**", "!/**/__tests__/**"],
"scripts": {
"build": "tsup",
"clean": "npx rimraf ./dist",
Expand Down
24 changes: 3 additions & 21 deletions packages/swagger-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,7 @@
"name": "@kubb/swagger-client",
"version": "2.12.2",
"description": "Generator swagger-client",
"keywords": [
"typescript",
"plugins",
"kubb",
"codegen",
"swagger",
"openapi",
"axios"
],
"keywords": ["typescript", "plugins", "kubb", "codegen", "swagger", "openapi", "axios"],
"repository": {
"type": "git",
"url": "git://github.com/kubb-project/kubb.git",
Expand Down Expand Up @@ -49,20 +41,10 @@
"types": "./dist/index.d.ts",
"typesVersions": {
"*": {
"components": [
"./dist/components.d.ts"
]
"components": ["./dist/components.d.ts"]
}
},
"files": [
"src",
"dist",
"client.ts",
"*.d.ts",
"*.d.cts",
"!/**/**.test.**",
"!/**/__tests__/**"
],
"files": ["src", "dist", "client.ts", "*.d.ts", "*.d.cts", "!/**/**.test.**", "!/**/__tests__/**"],
"scripts": {
"build": "tsup",
"clean": "npx rimraf ./dist",
Expand Down
Loading

0 comments on commit 89d865a

Please sign in to comment.