build: minor fixes (#344)

This commit is contained in:
winston authored and GitHub committed 2023-11-20 02:47:03 +01:00
1 parent 463a8a42a8
commit cf5be76064
11 files changed
+25 -19

No files matched your search

+11 -1
View File
@@ -1,8 +1,18 @@
import { UserStylesSchema } from "@/types/mod.d.ts";
import { UserStylesSchema } from "@/types/mod.ts";
import { join } from "std/path/mod.ts";
import { REPO_ROOT } from "@/deps.ts";
import Handlebars from "handlebars";
// we can have some nice things :)
Handlebars.registerHelper(
"pluralize",
(c: number | unknown[], str: string): string => {
if (typeof c === "undefined") return str;
const num = Array.isArray(c) ? c.length : c;
return num === 1 ? str : `${str}s`;
},
);
const heading = (
name: UserStylesSchema.Name,
link: UserStylesSchema.ApplicationLink,