Skip to content

Commit 9935eb1

Browse files
committed
update docs
1 parent 2bbd1f1 commit 9935eb1

File tree

6 files changed

+50
-6
lines changed

6 files changed

+50
-6
lines changed

docs/en/Component.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ export default class Hello extends Vue {
6060
Please go to chapter [Styling](./Style.md).
6161

6262
## index.ts
63-
This is component entry file, so that it will be easy to import other components.
63+
This is component entry file, so that it will be easy for other components to import this component.
6464

6565
```typescript
6666
export * from './hello.ts'
6767
```
6868

69-
The reason we don't name hello.ts as index.ts is considering editor is always showing file name, thus you will never know which component it belongs to, unless you want to change cli compoent template.
69+
The reason we don't name hello.ts as index.ts is considering editor is always showing file name, thus you will never know which component it belongs to.
7070

71-
## Import other components or templates
71+
## Import other components or modules
7272
Import root path is src by default.
7373

7474
```js

docs/en/Issues.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ compiler.plugin('compilation', function (compilation) {
1515
Right now we comment this piece of code, so if anything is changed on html under build/tpl, you need to refresh manually.
1616

1717
### production mode does not extract styles into css file
18-
When build production, styles in components are not extracted into css files. Now there is no solution for that.
18+
When build production, if you use `require.ensure` to split code, styles in dynamic components are not extracted into css files. Now there is no solution for that.
19+
20+
> You can set `allChunks: true` for `extract-text-webpack-plugin` in `build/webpack.prod.conf.js`, it will extract all styles into one css file.
21+
22+
> refs: https://github.com/webpack-contrib/extract-text-webpack-plugin/issues/120
1923
2024
> If you have any solutions or ideas, please submit [issue](https://github.com/MMF-FE/vue-typescript/issues) or [PR](https://github.com/MMF-FE/vue-typescript/pulls)

docs/en/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Introduction
2+
3+
vue-typescript is base on [vuejs-templates/webpack](https://github.com/vuejs-templates/webpack). Before using `vue-typescript`, it is recommended to look at the [this document](http://vuejs-templates.github.io/webpack/) first.
4+
5+
## Versions
6+
```
7+
vue: 2.x
8+
vue-loader: 13.x
9+
webpack: 3.x
10+
typescript: 2.4+
11+
```
12+
13+
## Quick Start
14+
15+
To use this template, scaffold a project with [vue-cli](https://github.com/vuejs/vue-cli). It is recommended to use npm 3+ for a more efficient dependency tree.
16+
17+
```bash
18+
npm install vue-cli -g
19+
vue init MMF-FE/vue-typescript my-project
20+
cd my-project
21+
npm install
22+
npm run dev
23+
```

docs/en/SUMMARY.MD

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Summary
2+
3+
* [Introduction](README.md)
4+
* [Project Structure](Structure.md)
5+
* [Commands](Command.md)
6+
* [Type Definition](Types.md)
7+
* [Component](Component.md)
8+
* [Use Back End Api](Api.md)
9+
* [Styling](Style.md)
10+
* [Vuex](Vuex.md)
11+
* [Test](Test.md)
12+
* [Issues](Issues.md)
13+

docs/zh-cn/Component.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export default class Hello extends Vue {
6565
export * from './hello.ts'
6666
```
6767

68-
为什么不直接将 hello.ts 命名为 index.ts 呢?这是因为考虑到编辑器打开文件的时候显示文件名的问题,不然显示 index.ts 你都不知道这个是哪个组件。如果你不想修改 cli 的组件模板。
68+
为什么不直接将 hello.ts 命名为 index.ts 呢?这是因为考虑到编辑器打开文件的时候显示文件名的问题,不然显示 index.ts 你都不知道这个是哪个组件。如果不想要 index.ts, 你可以修改 cli 的组件模板。
6969

7070
## 引入其他组件或模块
7171
引入其他组件或模块,默认以 src 目录开始查找的。

docs/zh-cn/Issues.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ compiler.plugin('compilation', function (compilation) {
1515
目前模板已经注释掉这段代码了,如果修改了 build/tpl 里面的 html, 需要手动刷新。
1616

1717
### production 模式下没有将样式抽离到 css 文件
18-
当 build production 的时候,组件里面的样式没有抽离到 css 文件中,这个问题目前还没有找到解决办法。
18+
当 build production 的时候,如果你使用 `require.ensure` 的方式分离代码,组件里面的样式不会抽离到单独的 css 文件中,这个问题目前还没有找到解决办法。
19+
20+
> `build/webpack.prod.conf.js` 文件中,你可以为插件 `extract-text-webpack-plugin` 设置 `allChunks: true`, 这样可以将所有的样式抽离到一个 css 文件中。
21+
22+
> refs: https://github.com/webpack-contrib/extract-text-webpack-plugin/issues/120
1923
2024
> 如果你找到了解决方法,麻烦提交一下 [issue](https://github.com/MMF-FE/vue-typescript/issues)[PR](https://github.com/MMF-FE/vue-typescript/pulls)

0 commit comments

Comments
 (0)