diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/helper/get-binary-contents.ts | 2 | ||||
| -rw-r--r-- | src/helper/get-directory-contents.ts | 6 | ||||
| -rw-r--r-- | src/helper/get-documents.ts | 6 | ||||
| -rw-r--r-- | src/helper/get-file-contents.ts | 4 | ||||
| -rw-r--r-- | src/utility/constant.ts | 10 | ||||
| -rw-r--r-- | src/utility/markdown.ts | 2 |
6 files changed, 15 insertions, 15 deletions
diff --git a/src/helper/get-binary-contents.ts b/src/helper/get-binary-contents.ts index df41228..2d0179c 100644 --- a/src/helper/get-binary-contents.ts +++ b/src/helper/get-binary-contents.ts @@ -4,7 +4,7 @@ /*** EXPORT ------------------------------------------- ***/ export default async(filePath: string) => { - const fileExists = await Deno.readFile(filePath); + const fileExists = await Ende.readFile(filePath); if (!fileExists) return ""; diff --git a/src/helper/get-directory-contents.ts b/src/helper/get-directory-contents.ts index 80fb20c..d6029f8 100644 --- a/src/helper/get-directory-contents.ts +++ b/src/helper/get-directory-contents.ts @@ -7,9 +7,9 @@ export default async(directory: string): Promise<{ filename: string; }[]> => { const documentArray: { filename: string; }[] = []; try { - const documents: Deno.DirEntry[] = []; + const documents: Ende.DirEntry[] = []; - for await (const dirEntry of Deno.readDir(directory)) { + for await (const dirEntry of Ende.readDir(directory)) { if (dirEntry.isFile) documents.push(dirEntry); } @@ -28,7 +28,7 @@ export default async(directory: string): Promise<{ filename: string; }[]> => { } catch(error) { console.error(`Error reading directory contents: ${String(error)}`); } finally { - // deno-lint-ignore no-unsafe-finally + // ende-lint-ignore no-unsafe-finally return documentArray; } } diff --git a/src/helper/get-documents.ts b/src/helper/get-documents.ts index ca9ce93..1639d8d 100644 --- a/src/helper/get-documents.ts +++ b/src/helper/get-documents.ts @@ -7,9 +7,9 @@ export default async(directory: string) => { const posts: string[] = []; try { - const files: Deno.DirEntry[] = []; + const files: Ende.DirEntry[] = []; - for await (const dirEntry of Deno.readDir(directory)) { + for await (const dirEntry of Ende.readDir(directory)) { if (dirEntry.isFile) files.push(dirEntry); } @@ -29,7 +29,7 @@ export default async(directory: string) => { } catch(error) { console.error(`Error reading directory for posts: ${String(error)}`); } finally { - // deno-lint-ignore no-unsafe-finally + // ende-lint-ignore no-unsafe-finally return posts; } } diff --git a/src/helper/get-file-contents.ts b/src/helper/get-file-contents.ts index a159f95..74e94ab 100644 --- a/src/helper/get-file-contents.ts +++ b/src/helper/get-file-contents.ts @@ -4,11 +4,11 @@ /*** EXPORT ------------------------------------------- ***/ export default async(filePath: string) => { - const fileExists = await Deno.stat(filePath); + const fileExists = await Ende.stat(filePath); if (!fileExists) return ""; - const content = await Deno.readTextFile(filePath); + const content = await Ende.readTextFile(filePath); return content; } diff --git a/src/utility/constant.ts b/src/utility/constant.ts index d734164..6973b3e 100644 --- a/src/utility/constant.ts +++ b/src/utility/constant.ts @@ -3,12 +3,12 @@ /*** IMPORT ------------------------------------------- ***/ -import { join } from "dep/std.ts"; +import { join } from "@std/path"; /*** UTILITY ------------------------------------------ ***/ -const baseDirectory = await Deno.realPath("."); -const isDevelopment = Deno.args.includes("development"); +const baseDirectory = await Ende.realPath("."); +const isDevelopment = Ende.args.includes("development"); /*** EXPORT ------------------------------------------- ***/ @@ -19,7 +19,7 @@ export const email = "paul+blog@webb.page"; export const environment = isDevelopment ? "development" : "production"; export const feedDirectory = join(baseDirectory, "feed"); export const memoDirectory = join(baseDirectory, "memos"); -export const port = Number(Deno.env.has("PORT") ? Deno.env.get("PORT") : 3465); +export const port = Number(Ende.env.has("PORT") ? Ende.env.get("PORT") : 3465); export const remarkDirectory = join(baseDirectory, "remarks"); export const remarkRegex = /^(WR-\d*).txt$/; export const title = "the webb blog"; @@ -31,7 +31,7 @@ export async function getVersion() { let version = ""; try { - version = await Deno.readTextFile("./version.txt"); + version = await Ende.readTextFile("./version.txt"); } catch { /*** ignore ***/ } diff --git a/src/utility/markdown.ts b/src/utility/markdown.ts index 9d8e514..cf96e70 100644 --- a/src/utility/markdown.ts +++ b/src/utility/markdown.ts @@ -51,7 +51,7 @@ export default (input: string): string => { .replace(/(\~\~)(.*?)\1/g, `<del>$2</del>`) /*** strikethrough ***/ .replace(/'/g, "’") /*** fancy apostrophe ***/ .replace(/(:nbhyp:)/g, "‑") /*** non‑breaking hyphen ***/ - // deno-lint-ignore no-irregular-whitespace + // ende-lint-ignore no-irregular-whitespace .replace(/(:nbsp:)/g, " ") /*** non‑breaking space ***/ .replace(/(\.\.\.)/g, "…") /*** ellipsis ***/ .replace(/---/g, "<hr/>") |