chore(*): cleanup and formatting

This commit is contained in:
Cory Dransfeldt 2025-05-18 13:24:16 -07:00
parent 4f72f68f68
commit 09e820e842
No known key found for this signature in database
33 changed files with 184 additions and 196 deletions

View file

@ -4,9 +4,9 @@ import { minify } from "terser";
export const minifyJsComponents = async () => {
const scriptsDir = "dist/assets/scripts";
const minifyJsFilesInDir = async (dir) => {
const files = fs.readdirSync(dir);
for (const fileName of files) {
const filePath = path.join(dir, fileName);
const stat = fs.statSync(filePath);
@ -16,6 +16,7 @@ export const minifyJsComponents = async () => {
} else if (fileName.endsWith(".js")) {
const fileContent = fs.readFileSync(filePath, "utf8");
const minified = await minify(fileContent);
if (minified.error) {
console.error(`Error minifying ${filePath}:`, minified.error);
} else {