Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
背景
旧的
config
逻辑分散在 js / addon 两层,默认配置也分别在 js / addon 两层定义,配置逻辑比较混乱。这里重构为:
configuration.js
申明ConfigStore
取消重复定义,修改为json
对象动态存取新增配置
需要新增配置,配置自身的逻辑上只需要:
configuration.js
,增加配置各项属性这样一处修改即可完成配置新增和使用。
测试
本 PR 不涉及到对外逻辑改动,重构功能依靠已有单元测试保证