From bfbb41ffc8060bc7c9ff634df303a7fa9d1613a9 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 29 Dec 2016 20:51:39 +0900 Subject: [PATCH] Reject when config not found --- gulpfile.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gulpfile.ts b/gulpfile.ts index 64ada61e4..8a87621d9 100644 --- a/gulpfile.ts +++ b/gulpfile.ts @@ -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;