summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2020-06-17 17:36:04 +0000
committergumi <git@gumi.ca>2020-06-17 17:43:58 +0000
commit54563d39dd010ca8ab5f7f4868670f16a553b336 (patch)
treeab204f2fa1841a4f606f1de25fd8c6b3949409b1 /src
parent3efeaa5d84c1399f21d45a1bdb58c71278dfee85 (diff)
downloadpolicies-54563d39dd010ca8ab5f7f4868670f16a553b336.tar.gz
policies-54563d39dd010ca8ab5f7f4868670f16a553b336.tar.bz2
policies-54563d39dd010ca8ab5f7f4868670f16a553b336.tar.xz
policies-54563d39dd010ca8ab5f7f4868670f16a553b336.zip
[ci skip] add editorconfig and fix misc formatting
Diffstat (limited to 'src')
-rw-r--r--src/build.ts24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/build.ts b/src/build.ts
index 19c6141..4749057 100644
--- a/src/build.ts
+++ b/src/build.ts
@@ -6,15 +6,15 @@ interface PolicyYFM {
name: string;
description: string;
aliases?: string[];
- ignore?: boolean;
- autoupdate?: {
- forums?: {
- forum?: number;
- topic?: number;
- post: number;
- };
- wiki?: string;
- };
+ ignore?: boolean;
+ autoupdate?: {
+ forums?: {
+ forum?: number;
+ topic?: number;
+ post: number;
+ };
+ wiki?: string;
+ };
}
const decoder = new TextDecoder("utf-8");
@@ -89,14 +89,14 @@ for await (const dirEntry of Deno.readDir("policies")) {
// add to the netlify redirect file
redirects += `/${shortName} /${shortName}/index.html 200!\n`;
-
+
// built-in aliases
if (shortName != shortName.replace("-", "_")) {
redirects += `/${shortName.replace("-", "_")} /${shortName} 302\n`;
} if (shortName != shortName.replace("-", "")) {
redirects += `/${shortName.replace("-", "")} /${shortName} 302\n`;
}
-
+
// process path aliases
if (Reflect.has(YFM, "aliases")) {
for (const alias of YFM.aliases as string[]) {
@@ -151,4 +151,4 @@ for await (const dirEntry of Deno.readDir("src/static")) {
await Deno.copyFile(`src/static/${dirEntry.name}`, `build/${dirEntry.name}`,);
}
-console.info(">> Build success ✅"); \ No newline at end of file
+console.info(">> Build success ✅");