This commit is contained in:
dylan
2024-03-25 00:29:43 -07:00
parent 334c09df7c
commit f960083e94
8 changed files with 213 additions and 26 deletions

11
scripts/run-with-env.ts Normal file
View File

@ -0,0 +1,11 @@
import dotenv from 'dotenv';
import * as url from 'url';
import * as path from 'path';
const __dirname = url.fileURLToPath(new URL('.', import.meta.url));
const dotenvPath = path.join(__dirname, "..", ".env");
dotenv.config({
path: dotenvPath,
});
if (process.argv[2]) {
import(path.join(process.cwd(), process.argv[2]));
}