@kubb/core
The core contains the building blocks for all plugins.
Installation
shell
bun add -d @kubb/core
shell
pnpm add -D @kubb/core
shell
npm install --save-dev @kubb/core
shell
yarn add -D @kubb/core
Usage
typescript
import { write } from '@kubb/fs'
import { build, getSource } from '@kubb/core'
const { error, files, pluginManager } = await build({
config: {
root: '.',
input: {
data: '',
},
output: {
path: './gen',
},
},
})
for (const file of files) {
const source = await getSource(file)
await write(file.path, file)
}
Start the build process based on a defined config(see UserConfig type). This will trigger the different plugins and their created lifecycle methods.