diff --git a/bun.lockb b/bun.lockb index 6a8d064..63ac5ac 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/src/constants/index.ts b/src/constants/index.ts index 8f0899d..f05f24e 100644 --- a/src/constants/index.ts +++ b/src/constants/index.ts @@ -1,5 +1,5 @@ // dev -export const DEVMODE = true; +export const DEV_MODE = true; // path export const FONT_PATH = "./fonts/Standard.flf"; diff --git a/src/utils/ascii.ts b/src/utils/ascii.ts index 8088df6..1ed44aa 100644 --- a/src/utils/ascii.ts +++ b/src/utils/ascii.ts @@ -6,7 +6,7 @@ import chalk from "chalk"; import pkg from "../../package.json"; /* constants */ -import { DEVMODE, FONT_PATH } from "@/constants"; +import { DEV_MODE, FONT_PATH } from "@/constants"; /* utils */ import { resolveRealPathAsync, readFileAsync } from "@/utils/extras"; @@ -22,7 +22,7 @@ export async function bannerRendererAsync( title: string, description: string, ): Promise { - const fontSource = DEVMODE + const fontSource = DEV_MODE ? FONT_PATH : await resolveRealPathAsync(FONT_PATH); const font = await readFileAsync(fontSource, "utf8"); diff --git a/src/utils/extras.ts b/src/utils/extras.ts index 6d64333..6bbccfd 100644 --- a/src/utils/extras.ts +++ b/src/utils/extras.ts @@ -8,7 +8,7 @@ import fs from "node:fs"; import { execa } from "execa"; /* constants */ -import { DEVMODE } from "@/constants"; +import { DEV_MODE } from "@/constants"; // ============================== @@ -52,7 +52,7 @@ export async function resolveRealPathAsync( export async function defaultOpenAsync(filePath: string): Promise { try { const platform = process.platform; - const realPath = DEVMODE ? filePath : await resolveRealPathAsync(filePath); + const realPath = DEV_MODE ? filePath : await resolveRealPathAsync(filePath); let execCMD = ""; switch (platform) { @@ -90,7 +90,7 @@ export async function copyFileAsync( target: string, ): Promise { try { - const realSource = DEVMODE ? source : await resolveRealPathAsync(source); + const realSource = DEV_MODE ? source : await resolveRealPathAsync(source); const targetDir = path.resolve(path.join(process.cwd(), target)); if (!fs.existsSync(targetDir)) { @@ -155,7 +155,7 @@ export async function writeToFileAsync( */ export async function readFromFileAsync(filePath: string): Promise { try { - const realPath = DEVMODE ? filePath : await resolveRealPathAsync(filePath); + const realPath = DEV_MODE ? filePath : await resolveRealPathAsync(filePath); const content = await readFileAsync(realPath, "utf8"); return content; } catch (error) {