mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-24 11:46:43 -06:00
Reject when config not found
This commit is contained in:
parent
22bb3c77ee
commit
7dd740ea70
1 changed files with 5 additions and 0 deletions
|
@ -30,6 +30,11 @@ const env = process.env.NODE_ENV;
|
||||||
const isProduction = env === 'production';
|
const isProduction = env === 'production';
|
||||||
const isDebug = !isProduction;
|
const isDebug = !isProduction;
|
||||||
|
|
||||||
|
if (!fs.existsSync('./.config/config.yml')) {
|
||||||
|
console.log('設定ファイルが見つかりません。npm run configしてください');
|
||||||
|
process.exit();
|
||||||
|
}
|
||||||
|
|
||||||
import { IConfig } from './src/config';
|
import { IConfig } from './src/config';
|
||||||
const config = eval(require('typescript').transpile(require('fs').readFileSync('./src/config.ts').toString()))
|
const config = eval(require('typescript').transpile(require('fs').readFileSync('./src/config.ts').toString()))
|
||||||
('.config/config.yml') as IConfig;
|
('.config/config.yml') as IConfig;
|
||||||
|
|
Loading…
Reference in a new issue