mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 13:26:01 +01:00
feat(build-docs): copy swagger UI
This commit is contained in:
10
apps/build-docs/src/swagger.ts
Normal file
10
apps/build-docs/src/swagger.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { getAbsoluteFSPath } from "swagger-ui-dist";
|
||||
import BuildContext from "./context";
|
||||
import { cpSync, mkdirSync } from "fs";
|
||||
import { join } from "path";
|
||||
|
||||
export default function buildSwagger({ baseDir }: BuildContext) {
|
||||
const absolutePath = getAbsoluteFSPath();
|
||||
const targetDir = join(baseDir, "api");
|
||||
cpSync(absolutePath, targetDir, { recursive: true });
|
||||
}
|
||||
Reference in New Issue
Block a user