Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Kitsukey
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kio!
Kitsukey
Commits
9abb108b
Commit
9abb108b
authored
8 years ago
by
syuilo
Browse files
Options
Downloads
Patches
Plain Diff
[BREAKING CHANGE] テスト時の設定ファイルを分けるように
See CHANGELOG for more details
parent
f76d55b1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CHANGELOG.md
+3
-0
3 additions, 0 deletions
CHANGELOG.md
gulpfile.ts
+2
-2
2 additions, 2 deletions
gulpfile.ts
src/config.ts
+13
-1
13 additions, 1 deletion
src/config.ts
tools/init.js
+1
-1
1 addition, 1 deletion
tools/init.js
with
19 additions
and
4 deletions
CHANGELOG.md
+
3
−
0
View file @
9abb108b
# Server
## 2
configのファイル名: config.yml --> default.yml
## 1
First version
...
...
This diff is collapsed.
Click to expand it.
gulpfile.ts
+
2
−
2
View file @
9abb108b
...
...
@@ -31,12 +31,12 @@ const env = process.env.NODE_ENV;
const
isProduction
=
env
===
'
production
'
;
const
isDebug
=
!
isProduction
;
if
(
!
fs
.
existsSync
(
'
./.config/
config
.yml
'
))
{
if
(
!
fs
.
existsSync
(
'
./.config/
default
.yml
'
))
{
console
.
log
(
'
npm run configを実行して設定ファイルを作成してください
'
);
process
.
exit
();
}
(
global
as
any
).
MISSKEY_CONFIG_PATH
=
'
.config/
config
.yml
'
;
(
global
as
any
).
MISSKEY_CONFIG_PATH
=
'
.config/
default
.yml
'
;
import
{
IConfig
}
from
'
./src/config
'
;
const
config
=
eval
(
require
(
'
typescript
'
).
transpile
(
require
(
'
fs
'
).
readFileSync
(
'
./src/config.ts
'
).
toString
()))()
as
IConfig
;
...
...
This diff is collapsed.
Click to expand it.
src/config.ts
+
13
−
1
View file @
9abb108b
...
...
@@ -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`
;
/**
* ユーザーが設定する必要のある情報
...
...
This diff is collapsed.
Click to expand it.
tools/init.js
+
1
−
1
View file @
9abb108b
...
...
@@ -3,7 +3,7 @@ const yaml = require('js-yaml');
const
inquirer
=
require
(
'
inquirer
'
);
const
configDirPath
=
`
${
__dirname
}
/../.config`
;
const
configPath
=
`
${
configDirPath
}
/
config
.yml`
;
const
configPath
=
`
${
configDirPath
}
/
default
.yml`
;
const
form
=
[
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment