Skip to content
Snippets Groups Projects
Commit 7dd740ea authored by syuilo's avatar syuilo
Browse files

Reject when config not found

parent 22bb3c77
No related branches found
No related tags found
No related merge requests found
......@@ -30,6 +30,11 @@ const env = process.env.NODE_ENV;
const isProduction = env === 'production';
const isDebug = !isProduction;
if (!fs.existsSync('./.config/config.yml')) {
console.log('設定ファイルが見つかりません。npm run configしてください');
process.exit();
}
import { IConfig } from './src/config';
const config = eval(require('typescript').transpile(require('fs').readFileSync('./src/config.ts').toString()))
('.config/config.yml') as IConfig;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment