mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 13:26:01 +01:00
feat(build-docs): clean before building
This commit is contained in:
@@ -1,9 +1,19 @@
|
||||
import { join } from "path";
|
||||
import BuildContext from "./context";
|
||||
import buildSwagger from "./swagger";
|
||||
import { mkdirSync, rmSync } from "fs";
|
||||
|
||||
const context: BuildContext = {
|
||||
baseDir: join(__dirname, "../../../site")
|
||||
};
|
||||
|
||||
buildSwagger(context);
|
||||
function main() {
|
||||
// Clean input dir.
|
||||
rmSync(context.baseDir, { recursive: true });
|
||||
mkdirSync(context.baseDir);
|
||||
|
||||
// Start building.
|
||||
buildSwagger(context);
|
||||
}
|
||||
|
||||
main();
|
||||
|
||||
Reference in New Issue
Block a user