@kubb/core
The core contains the building blocks for all plugins.
Installation
shell
bun add @kubb/core
shell
pnpm add @kubb/core
shell
npm install @kubb/core
shell
yarn add @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.