Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: translate basic/config.md #875

Merged
merged 5 commits into from May 16, 2017
Merged

docs: translate basic/config.md #875

merged 5 commits into from May 16, 2017

Conversation

Brian175
Copy link
Contributor

@Brian175 Brian175 commented May 9, 2017

'config.md' is translated by @jwssdwed and proofread by @Brian175 and finalized by @mmoaay

@Brian175 Brian175 requested a review from atian25 May 9, 2017 12:33
@popomore
Copy link
Member

popomore commented May 9, 2017

@Brian175 where are you proofreading the translation?

@codecov
Copy link

codecov bot commented May 9, 2017

Codecov Report

Merging #875 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #875   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          28     28           
  Lines         667    667           
=====================================
  Hits          667    667

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e13c515...1cb5281. Read the comment docs.

@Brian175
Copy link
Contributor Author

Brian175 commented May 9, 2017

@popomore hello, this translation is from swiftgg and we have proofreaded and finalized to some degree to gurantee the quality

};
```
The build-in appInfo contains:
<table>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use markdown syntax

|- config.unittest.js
|- config.local.js
```
```config.default.js``` is the default file for configuration, and all environments will load this file. Besides, this is usually used as default configuration file for development environment.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inline code can change to single `

@@ -0,0 +1,188 @@
title: Configuration
---
This framework provides powerful and extensible configuration function, including automatically merging applications, plug-ins, and framework's configuration. In addition, it allows users to overwrite configuration in sequence and maintain different configs depending on different environments. The result (i.e. merged config) can be accessed from ```app.config ```.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

` 是一个,不是三个,下同

2. Using platform to manage configurations: you can pass the current environment configuration via environment variables while starting. This is a relatively elegant approach with higher requirement on operation and support from configuration platform. Moreover, The configuration environment has same flaws as first method.
3. Using code to manage configurations: you can add some environment configurations in codes and pass them to current environment arguments while starting. However, it doesn't allow you to configurate globally and you need to alter your code whenever you want to change the configuration.

we choose the last method, namely **configurate with code**, The change of configuration should be also released after review. The application package itself is capable to be deployed in several environments, only by specifing the running environment.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

method 换为 way 或 strategy 会不会好一点?

```
As demonstrated above, the framework overwirte arrays instead of merging them.

## plug-in Configuration
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plugin

};
```

### Importing plugins
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hook 或 Mount 貌似更准确一点

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about 'load' or 'use'

@popomore popomore changed the title Basics.config docs: translate basic/config.md May 10, 2017
Brian175 and others added 2 commits May 10, 2017 23:19
ps: Is there any suggestions for the case sensitivity of subTitles?
@popomore
Copy link
Member

cc @atian25

@popomore popomore merged commit ddd342c into eggjs:master May 16, 2017
@popomore
Copy link
Member

#363

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants