mockkit.json
mockkit.json is the MockKit configuration file for a project. It must exist in the project root directory.
The JSON structure is as follows.
ts
type ManifestJson = {
name: string
settings: {
path: {
normalizeTrailingSlash: 'append' | 'remove' | 'preserve'
}
}
build: {
engine: 'manual' | 'nuxt'
distDir: string
publicDir: string
devPort: number
devCommand: string
generateCommand: string
}
sitemap: SiteMapItem[]
}
type SiteMapItem = GroupItem | PageItem
type GroupItem = {
type: 'group'
name: string
content: SiteMapItem[]
}
type PageItem = {
type: 'page'
name: string
path: string
}The meaning of each field is as follows.
| Field | Description | Example |
|---|---|---|
| name | Site name | 'My First Project' |
| settings.path.normalizeTrailingSlash | How to normalize trailing slashes in URLs: 'append', 'remove', or 'preserve' | 'append' |
| build.engine | Static site generator type: 'manual' or 'nuxt' | 'manual' |
| build.distDir | Build output directory | 'dist' |
| build.publicDir | Build output public directory | 'public' |
| build.devPort | Development server port | 3000 |
| build.devCommand | Development server start command | 'npm run dev' |
| build.generateCommand | Static site generation command | 'npm run generate' |
| sitemap | Sitemap contents (described below) | [] |