[BREAKING CHANGE] テスト時の設定ファイルを分けるように

See CHANGELOG for more details
This commit is contained in:
syuilo
2017-01-17 08:37:24 +09:00
parent f76d55b1d2
commit 9abb108b5e
4 changed files with 19 additions and 4 deletions

View File

@ -6,7 +6,19 @@ import * as fs from 'fs';
import * as yaml from 'js-yaml';
import * as isUrl from 'is-url';
export const path = (global as any).MISSKEY_CONFIG_PATH ? (global as any).MISSKEY_CONFIG_PATH : `${__dirname}/../.config/config.yml`;
/**
* Path of configuration directory
*/
const dir = `${__dirname}/../.config`;
/**
* Path of configuration file
*/
export const path = (global as any).MISSKEY_CONFIG_PATH
? (global as any).MISSKEY_CONFIG_PATH
: process.env.NODE_ENV == 'test'
? `${dir}/test.yml`
: `${dir}/default.yml`;
/**
* ユーザーが設定する必要のある情報