diff options
author | gumi <git@gumi.ca> | 2020-06-17 17:36:04 +0000 |
---|---|---|
committer | gumi <git@gumi.ca> | 2020-06-17 17:43:58 +0000 |
commit | 54563d39dd010ca8ab5f7f4868670f16a553b336 (patch) | |
tree | ab204f2fa1841a4f606f1de25fd8c6b3949409b1 | |
parent | 3efeaa5d84c1399f21d45a1bdb58c71278dfee85 (diff) | |
download | policies-54563d39dd010ca8ab5f7f4868670f16a553b336.tar.gz policies-54563d39dd010ca8ab5f7f4868670f16a553b336.tar.bz2 policies-54563d39dd010ca8ab5f7f4868670f16a553b336.tar.xz policies-54563d39dd010ca8ab5f7f4868670f16a553b336.zip |
[ci skip] add editorconfig and fix misc formatting
-rw-r--r-- | .editorconfig | 12 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | src/build.ts | 24 |
3 files changed, 25 insertions, 13 deletions
diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..40e3782 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +# top-most EditorConfig file +root = true + +[*] +indent_style = tab +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +indent_style = space +indent_size = 4 @@ -9,4 +9,4 @@ build: .PHONY: deno # installs deno (only use this in CI) deno: - curl -fsSL https://deno.land/x/install/install.sh | sh
\ No newline at end of file + curl -fsSL https://deno.land/x/install/install.sh | sh 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 ✅"); |