build: refactor & use handlebars for generate templating (#343)
This commit is contained in:
1 parent
b1f864c1c8
commit
f48eba6354
23 files changed
+681
-408
No files matched your search
Executable
+16
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env -S deno run -A
|
||||
// deno-lint-ignore-file no-explicit-any
|
||||
import { join } from "std/path/mod.ts";
|
||||
import { compile, Options } from "npm:json-schema-to-typescript";
|
||||
import { REPO_ROOT, userStylesSchema } from "@/deps.ts";
|
||||
|
||||
const options = {
|
||||
bannerComment: "// deno-fmt-ignore-file",
|
||||
} satisfies Partial<Options>;
|
||||
|
||||
const TYPES_ROOT = join(REPO_ROOT, "scripts/types");
|
||||
|
||||
compile(userStylesSchema as any, "UserstylesSchema", options)
|
||||
.then((ts) =>
|
||||
Deno.writeTextFileSync(join(TYPES_ROOT, "userstyles.d.ts"), ts)
|
||||
);
|
||||
Reference in new issue
Block a user