Skip to content

Commit 02097c0

Browse files
committed
update docs
1 parent 35cc995 commit 02097c0

File tree

3 files changed

+31
-46
lines changed

3 files changed

+31
-46
lines changed

README.md

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
<p align="center">
66
<a href="https://github.com/vuejs/vue">
7-
<img src="https://img.shields.io/badge/vue-2.%3Cspan%20class="x x-first x-last">5.17-brightgreen.svg" alt="vue">
7+
<img src="https://img.shields.io/badge/vue-2.%3Cspan%20class="x x-first x-last">6.10-brightgreen.svg" alt="vue">
88
</a>
99
<a href="https://github.com/ElemeFE/element">
10-
<img src="https://img.shields.io/badge/element--ui-2.%3Cspan%20class="x x-first x-last">4.11-brightgreen.svg" alt="element-ui">
10+
<img src="https://img.shields.io/badge/element--ui-2.%3Cspan%20class="x x-first x-last">6.3-brightgreen.svg" alt="element-ui">
1111
</a>
1212
<a href="https://travis-ci.org/PanJiaChen/vue-element-admin" rel="nofollow">
1313
<img src="https://travis-ci.org/PanJiaChen/vue-element-admin.svg?branch=master" alt="Build Status">
@@ -46,18 +46,12 @@ It is a magical vue admin based on the newest development stack of vue, built-in
4646

4747
- [Gitee](https://panjiachen.gitee.io/vue-element-admin/) 国内用户可访问该地址在线预览
4848

49-
**This project is positioned as a background integration solution and is not suitable for secondary development as a basic template.**
50-
5149
- Base template recommends using: [vue-admin-template](https://github.com/PanJiaChen/vue-admin-template)
5250
- Desktop: [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin)
5351
- Typescript: [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (Credits: [@Armour](https://github.com/Armour))
5452

5553
**This project does not support low version browsers (e.g. IE). Please add polyfill yourself if you need them.**
5654

57-
**Note: This project uses [email protected]+ version, so the minimum compatible [email protected]+**
58-
59-
**Start using `webpack4` from `v3.8.0`. If you still want to continue using `webpack3`, please use this branch [webpack3](https://github.com/PanJiaChen/vue-element-admin/tree/webpack3)**
60-
6155
## Preparation
6256

6357
You need to install [node](http://nodejs.org/) and [git](https://git-scm.com/) locally. The project is based on [ES2015+](http://es6.ruanyifeng.com/), [vue](https://cn.vuejs.org/index.html), [vuex](https://vuex.vuejs.org/zh-cn/), [vue-router](https://router.vuejs.org/zh-cn/), [axios](https://github.com/axios/axios) and [element-ui](https://github.com/ElemeFE/element), all request data is simulated using [Mock.js](https://github.com/nuysoft/Mock).
@@ -70,6 +64,7 @@ Understanding and learning this knowledge in advance will greatly help the use o
7064
</p>
7165

7266
## Sponsors
67+
7368
Become a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor]](https://www.patreon.com/panjiachen)
7469

7570
<a href="https://flatlogic.com/admin-dashboards?from=vue-element-admin"><img width="150px" src="https://wpimg.wallstcn.com/9c0b719b-5551-4c1e-b776-63994632d94a.png" /></a><p>Admin Dashboard Templates made with Vue, React and Angular.</p>
@@ -159,7 +154,7 @@ This will automatically open http://localhost:9527.
159154

160155
```bash
161156
# build for test environment
162-
npm run build:sit
157+
npm run build:stage
163158

164159
# build for production environment
165160
npm run build:prod
@@ -168,19 +163,16 @@ npm run build:prod
168163
## Advanced
169164

170165
```bash
171-
# --report to build with bundle size analytics
172-
npm run build:prod --report
173-
174-
# --generate a bundle size analytics. default: bundle-report.html
175-
npm run build:prod --generate_report
166+
# preview the release environment effect
167+
npm run preview
176168

177-
# --preview to start a server in local to preview
178-
npm run build:prod --preview
169+
# preview the release environment effect + static resource analysis
170+
npm run preview -- --report
179171

180-
# lint code
172+
# code format check
181173
npm run lint
182174

183-
# auto fix
175+
# code format check and auto fix
184176
npm run lint -- --fix
185177
```
186178

README.zh-CN.md

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
<p align="center">
66
<a href="https://github.com/vuejs/vue">
7-
<img src="https://img.shields.io/badge/vue-2.%3Cspan%20class="x x-first x-last">5.10-brightgreen.svg" alt="vue">
7+
<img src="https://img.shields.io/badge/vue-2.%3Cspan%20class="x x-first x-last">6.10-brightgreen.svg" alt="vue">
88
</a>
99
<a href="https://github.com/ElemeFE/element">
10-
<img src="https://img.shields.io/badge/element--ui-2.%3Cspan%20class="x x-first x-last">4.11-brightgreen.svg" alt="element-ui">
10+
<img src="https://img.shields.io/badge/element--ui-2.%3Cspan%20class="x x-first x-last">6.3-brightgreen.svg" alt="element-ui">
1111
</a>
1212
<a href="https://travis-ci.org/PanJiaChen/vue-element-admin" rel="nofollow">
1313
<img src="https://travis-ci.org/PanJiaChen/vue-element-admin.svg?branch=master" alt="Build Status">
@@ -46,17 +46,11 @@
4646

4747
- [国内访问文档](https://panjiachen.gitee.io/vue-element-admin-site/zh/) 方便没翻墙的用户查看文档
4848

49-
**本项目的定位是后台集成方案,不适合当基础模板来开发。**
50-
5149
- 模板建议使用: [vue-admin-template](https://github.com/PanJiaChen/vue-admin-template)
5250
- 桌面端: [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin)
5351
- Typescript版: [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (鸣谢: [@Armour](https://github.com/Armour))
5452

55-
群主 **[圈子](https://jianshiapp.com/circles/1209)** 楼主会经常分享一些技术相关的东西,或者加入[qq 群](https://github.com/PanJiaChen/vue-element-admin/issues/602)
56-
57-
**注意:该项目使用 [email protected]+ 版本,所以最低兼容 [email protected]+**
58-
59-
**`v3.8.0`开始使用`webpack4`。所以若还想使用`webpack3`开发,请使用该分支[webpack3](https://github.com/PanJiaChen/vue-element-admin/tree/webpack3)**
53+
群主 **[圈子](https://jianshiapp.com/circles/1209)** 楼主会经常分享一些技术相关的东西,或者加入[qq 群](https://github.com/PanJiaChen/vue-element-admin/issues/602)或者关注[微博](https://weibo.com/u/3423485724?is_all=1)
6054

6155
**该项目不支持低版本浏览器(如 ie),有需求请自行添加 polyfill [详情](https://github.com/PanJiaChen/vue-element-admin/wiki#babel-polyfill)**
6256

@@ -94,6 +88,7 @@ Become a sponsor and get your logo on our README on GitHub with a link to your s
9488
- 权限验证
9589
- 页面权限
9690
- 指令权限
91+
- 权限配置
9792
- 二步登录
9893
9994
- 多环境发布
@@ -106,7 +101,7 @@ Become a sponsor and get your logo on our README on GitHub with a link to your s
106101
- 动态面包屑
107102
- 快捷导航(标签页)
108103
- Svg Sprite 图标
109-
- 本地mock数据
104+
- 本地 mock 数据
110105
- Screenfull全屏
111106
- 自适应收缩侧边栏
112107
@@ -174,7 +169,7 @@ npm run dev
174169

175170
```bash
176171
# 构建测试环境
177-
npm run build:sit
172+
npm run build:stage
178173

179174
# 构建生产环境
180175
npm run build:prod
@@ -183,19 +178,16 @@ npm run build:prod
183178
## 其它
184179

185180
```bash
186-
# --report to build with bundle size analytics
187-
npm run build:prod
188-
189-
# --generate a bundle size analytics. default: bundle-report.html
190-
npm run build:prod --generate_report
181+
# 预览发布环境效果
182+
npm run preview
191183

192-
# --preview to start a server in local to preview
193-
npm run build:prod --preview
184+
# 预览发布环境效果 + 静态资源分析
185+
npm run preview -- --report
194186

195-
# lint code
187+
# 代码格式检查
196188
npm run lint
197189

198-
# auto fix
190+
# 代码格式检查并自动修复
199191
npm run lint -- --fix
200192
```
201193

build/index.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ const rawArgv = process.argv.slice(2)
55
const args = rawArgv.join(' ')
66

77
if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
8-
run(`vue-cli-service build ${args} --report`)
8+
const report = rawArgv.includes('--report')
9+
10+
run(`vue-cli-service build ${args}`)
911

1012
const port = 9526
1113
const publicPath = config.publicPath
@@ -21,13 +23,12 @@ if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
2123
})
2224
)
2325

24-
app.listen(port, function() {
25-
console.log(
26-
chalk.green(`> Preview at http://localhost:${port}${publicPath}`)
27-
)
28-
console.log(
29-
chalk.green(`> Report at http://localhost:${port}${publicPath}/report.html`)
30-
)
26+
app.listen(port, function () {
27+
console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`))
28+
if (report) {
29+
console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}/report.html`))
30+
}
31+
3132
})
3233
} else {
3334
run(`vue-cli-service build ${args}`)

0 commit comments

Comments
 (0)