Skip to content

Commit bd1e63b

Browse files
committed
Merge branch 'develop'
2 parents 62472dd + 28ef28b commit bd1e63b

File tree

373 files changed

+2806
-2231
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

373 files changed

+2806
-2231
lines changed

admin/.babelrc

-12
This file was deleted.

admin/.env.development

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# just a flag
2+
ENV = 'development'
3+
4+
# base api
5+
VUE_APP_BASE_API = 'http://127.0.0.1:8000'
6+
7+
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
8+
# to control whether the babel-plugin-dynamic-import-node plugin is enabled.
9+
# It only does one thing by converting all import() to require().
10+
# This configuration can significantly increase the speed of hot updates,
11+
# when you have a large number of pages.
12+
# Detail: https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/babel-preset-app/index.js
13+
14+
VUE_CLI_BABEL_TRANSPILE_MODULES = true
15+
VUE_APP_WEBSOCKET = 'ws://127.0.0.1:5200'

admin/.env.production

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# just a flag
2+
ENV = 'production'
3+
4+
# base api
5+
VUE_APP_BASE_API = 'https://www.guke1.com'
6+
VUE_APP_WEBSOCKET = 'wss://www.guke1.com/ws'
7+

admin/.env.staging

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
NODE_ENV = production
2+
3+
# just a flag
4+
ENV = 'staging'
5+
6+
# base api
7+
VUE_APP_BASE_API = '/stage-api'
8+

admin/.eslintignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
build/*.js
2-
config/*.js
32
src/assets
3+
public
4+
dist

admin/.eslintrc.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ module.exports = {
2121
"allowFirstLine": false
2222
}
2323
}],
24+
"vue/singleline-html-element-content-newline": "off",
25+
"vue/multiline-html-element-content-newline":"off",
2426
"vue/name-property-casing": ["error", "PascalCase"],
27+
"vue/no-v-html": "off",
2528
'accessor-pairs': 2,
2629
'arrow-spacing': [2, {
2730
'before': true,
@@ -44,7 +47,7 @@ module.exports = {
4447
'curly': [2, 'multi-line'],
4548
'dot-location': [2, 'property'],
4649
'eol-last': 2,
47-
'eqeqeq': [2, 'allow-null'],
50+
'eqeqeq': ["error", "always", {"null": "ignore"}],
4851
'generator-star-spacing': [2, {
4952
'before': true,
5053
'after': true
@@ -73,7 +76,7 @@ module.exports = {
7376
'no-class-assign': 2,
7477
'no-cond-assign': 2,
7578
'no-const-assign': 2,
76-
'no-control-regex': 2,
79+
'no-control-regex': 0,
7780
'no-delete-var': 2,
7881
'no-dupe-args': 2,
7982
'no-dupe-class-members': 2,
@@ -193,4 +196,3 @@ module.exports = {
193196
'array-bracket-spacing': [2, 'never']
194197
}
195198
}
196-

admin/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ npm-debug.log*
55
yarn-debug.log*
66
yarn-error.log*
77
package-lock.json
8+
tests/**/coverage/
89

910
# Editor directories and files
1011
.idea

admin/.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language: node_js
2-
node_js: stable
2+
node_js: 10
33
script: npm run test
44
notifications:
55
email: false

admin/README.md

+62-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
# vue-admin
2+
> 这是一个极简的 vue admin 管理后台。它只包含了 Element UI & axios & iconfont & permission control & lint,这些搭建后台必要的东西。
3+
4+
目前版本基于 `vue-cli` 进行构建
25

36
## 安装
47

58
```bash
6-
# Clone 项目
7-
git clone https://gitee.com/lisgroup/vueBus.git
89

910
# 切换目录
10-
cd vueBus/admin
11+
cd admin
1112

1213
# 安装 npm 包
1314
npm install
1415

16+
# npm 下载速度慢的可以使用
17+
npm install --registry=https://registry.npm.taobao.org
18+
1519
# 启动测试服务,默认 http://localhost:9090
1620
npm run dev
1721

@@ -20,4 +24,58 @@ npm run build
2024

2125
# Build for production and view the bundle analyzer report
2226
npm run build --report
23-
```
27+
```
28+
29+
30+
# vue-admin-template
31+
32+
33+
34+
35+
36+
## Build Setup
37+
38+
```bash
39+
# 克隆项目
40+
git clone https://github.com/PanJiaChen/vue-admin-template.git
41+
42+
# 进入项目目录
43+
cd vue-admin-template
44+
45+
# 安装依赖
46+
npm install
47+
48+
# 建议不要直接使用 cnpm 安装以来,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题
49+
npm install --registry=https://registry.npm.taobao.org
50+
51+
# 启动服务
52+
npm run dev
53+
```
54+
55+
浏览器访问 [http://localhost:9090/admin](http://localhost:9090/admin)
56+
57+
## 发布
58+
59+
```bash
60+
# 构建测试环境
61+
npm run build:stage
62+
63+
# 构建生产环境
64+
npm run build
65+
```
66+
67+
## 其它
68+
69+
```bash
70+
# 预览发布环境效果
71+
npm run preview
72+
73+
# 预览发布环境效果 + 静态资源分析
74+
npm run preview -- --report
75+
76+
# 代码格式检查
77+
npm run lint
78+
79+
# 代码格式检查并自动修复
80+
npm run lint -- --fix
81+
```

admin/babel.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
presets: [
3+
'@vue/app'
4+
]
5+
}

admin/build/build.js

-45
This file was deleted.

admin/build/check-versions.js

-64
This file was deleted.

admin/build/index.js

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
const { run } = require('runjs')
2+
const chalk = require('chalk')
3+
const config = require('../vue.config.js')
4+
const rawArgv = process.argv.slice(2)
5+
const args = rawArgv.join(' ')
6+
7+
if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
8+
const report = rawArgv.includes('--report')
9+
10+
run(`vue-cli-service build ${args}`)
11+
12+
const port = 9526
13+
const publicPath = config.publicPath
14+
15+
const connect = require('connect')
16+
const serveStatic = require('serve-static')
17+
const app = connect()
18+
19+
app.use(
20+
publicPath,
21+
serveStatic('./dist', {
22+
index: ['index.html', '/']
23+
})
24+
)
25+
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+
32+
})
33+
} else {
34+
run(`vue-cli-service build ${args}`)
35+
}

admin/build/logo.png

-6.69 KB
Binary file not shown.

0 commit comments

Comments
 (0)