feat: add optional dotenv support

This adds an optional import for 'dotenv'. If dotenv is installed
via npm then the .env file will be loaded.
This commit is contained in:
KernelDeimos
2025-09-22 19:13:05 -04:00
parent 49341321f1
commit 15eb44d62d

View File

@@ -26,6 +26,13 @@
import console from 'node:console';
import process from 'node:process';
try {
const dotenv = require('dotenv');
dotenv.config();
} catch (e) {
// dotenv is optional
}
const surrounding_box = (col, lines) => {
const lengths = lines.map(line => line.length);