mirror of
https://github.com/vcscsvcscs/GenerationsHeritage.git
synced 2025-08-14 06:49:05 +02:00
add code generation
This commit is contained in:
@@ -1,9 +1,18 @@
|
||||
import { paraglide } from '@inlang/paraglide-sveltekit/vite';
|
||||
import { defineConfig } from 'vitest/config';
|
||||
import { execSync } from "child_process";
|
||||
import { sveltekit } from '@sveltejs/kit/vite';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
{
|
||||
name: "openapi-generate",
|
||||
buildStart() {
|
||||
console.log("Generating TypeScript client from OpenAPI...");
|
||||
execSync("npx openapi-typescript ../../api/openapi.json --output src/lib/api/api.gen.ts", { stdio: "inherit" });
|
||||
console.log("OpenAPI client generated!");
|
||||
}
|
||||
},
|
||||
sveltekit(),
|
||||
paraglide({
|
||||
project: './project.inlang',
|
||||
|
Reference in New Issue
Block a user