fix: add config.ts with config variable (BASE_DIR...)
This commit is contained in:
1 parent
d1ccc902da
commit
2efed9dcfc
8 files changed
+26
-32
No files matched your search
+1
-5
@@ -1,11 +1,7 @@
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
import { BASE_DIR, _isBunBinary } from './config.js'
|
||||
|
||||
const _isBunBinary = typeof (globalThis as any).Bun !== 'undefined'
|
||||
&& path.dirname((process as any).execPath) !== process.cwd()
|
||||
const BASE_DIR = _isBunBinary
|
||||
? path.dirname((process as any).execPath)
|
||||
: process.cwd()
|
||||
const DATA_PATH = path.join(BASE_DIR, 'config', 'settings.json')
|
||||
|
||||
export interface Settings {
|
||||
|
||||
Reference in new issue
Block a user