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

doc: update router.md #2677

Merged
merged 6 commits into from
Jun 26, 2019
Merged

doc: update router.md #2677

merged 6 commits into from
Jun 26, 2019

Conversation

wellenzhong
Copy link
Contributor

添加:配置路由时指定配置文件

Checklist
  • npm test passes
  • tests are included
  • documentation is changed or added
  • commit message follows commit guidelines
Description of change

添加:配置路由时指定配置文件
@coveralls
Copy link

coveralls commented Jun 21, 2019

Pull Request Test Coverage Report for Build 4338

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 26 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.04%) to 33.825%

Files with Coverage Reduction New Missed Lines %
packages/af-webpack/src/getConfig/css.js 8 73.64%
packages/umi-build-dev/src/plugins/commands/dev/index.js 8 0.0%
packages/umi-plugin-dll/src/buildDll.js 10 0.0%
Totals Coverage Status
Change from base Build 4262: 0.04%
Covered Lines: 1459
Relevant Lines: 4292

💛 - Coveralls

@@ -201,7 +201,7 @@ export default () => {

## 配置式路由

如果你倾向于使用配置式的路由,可以配置 `routes` ,**此配置项存在时则不会对 `src/pages` 目录做约定式的解析**。
如果你倾向于使用配置式的路由,可以配置`.umirc.ts` 文件中的 `routes` 属性,**此配置项存在时则不会对 `src/pages` 目录做约定式的解析**。
Copy link
Contributor

@ycjcl868 ycjcl868 Jun 21, 2019

Choose a reason for hiding this comment

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

可以是 .umirc.(ts|js)config/config.(ts|js)。 或者 通过[配置文件](https://umijs.org/zh/guide/app-structure.html#umirc-js-ts-%E5%92%8C-config-config-js-ts)中的

英文版也加下吧

Copy link
Contributor Author

Choose a reason for hiding this comment

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

加上去了

修改配置式路由,添加配置文件指引
Add:a guide file tips of the Configuration Routing
@sorrycc
Copy link
Member

sorrycc commented Jun 26, 2019

  1. 中英文之间加空格
  2. 用一个 包裹路径或代码,不要用三个

@@ -201,7 +201,7 @@ A route configuration is generated:

## Configuration Routing

If you prefer to use a configured route, you can configure `routes`, **this configuration item will not be parsed for the `src/pages` directory**.
If you prefer to use a configured route, you can configure `routes` in the configuration file either ``.umirc.(ts|js)``or```config/config.(ts|js)```, **this configuration item will not be parsed for the `src/pages` directory**.
Copy link
Contributor

@afc163 afc163 Jun 26, 2019

Choose a reason for hiding this comment

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

这里还有 ```

Copy link
Contributor Author

Choose a reason for hiding this comment

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

刚才正在改~

Fixed: a space between code and text
@@ -201,7 +201,7 @@ A route configuration is generated:

## Configuration Routing

If you prefer to use a configured route, you can configure `routes` in the configuration file either ``.umirc.(ts|js)``or```config/config.(ts|js)```, **this configuration item will not be parsed for the `src/pages` directory**.
If you prefer to use a configured route, you can configure `routes` in the configuration file either `.umirc.(ts|js)` or `config/config.(ts|js)` , **this configuration item will not be parsed for the `src/pages` directory**.
Copy link
Contributor

Choose a reason for hiding this comment

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

标点前不加空格。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed.

Fixed: remove the space from the front of comma
@sorrycc sorrycc changed the title Update router.md doc: update router.md Jun 26, 2019
@sorrycc sorrycc merged commit 39ad27d into umijs:master Jun 26, 2019
kuitos pushed a commit to kuitos/umi that referenced this pull request Jul 23, 2019
* Update router.md

添加:配置路由时指定配置文件

* 修改配置式路由,添加配置文件指引

修改配置式路由,添加配置文件指引

* Add:a guide file tips of the Configuration Routing

Add:a guide file tips of the Configuration Routing

* 修改:格式调整

格式调整

* Fixed: a space between code and text

Fixed: a space between code and text

* Fixed: remove the space from the front of comma

Fixed: remove the space from the front of comma
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants