preliminary stuff
This commit is contained in:
11
scripts/run-with-env.ts
Normal file
11
scripts/run-with-env.ts
Normal 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]));
|
||||
}
|
Reference in New Issue
Block a user