Skip to content

Commit 8b146b8

Browse files
committed
Break Changes use Vue-cli3 fixed #65
1 parent 70c652f commit 8b146b8

Some content is hidden

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

46 files changed

+20012
-763
lines changed

.browserslistrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
> 1%
2+
last 2 versions
3+
not ie <= 8

.eslintrc.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
node: true
5+
},
6+
'extends': [
7+
'plugin:vue/essential',
8+
'@vue/prettier'
9+
],
10+
rules: {
11+
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
12+
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
13+
},
14+
parserOptions: {
15+
parser: 'babel-eslint'
16+
}
17+
}

.gitignore

+19-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
.DS_Store
2-
node_modules/
3-
dist/
4-
npm-debug.log
2+
node_modules
3+
/dist
4+
5+
# local env files
6+
.env.local
7+
.env.*.local
8+
9+
# Log files
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
14+
# Editor directories and files
515
.idea
16+
.vscode
17+
*.suo
18+
*.ntvs*
19+
*.njsproj
20+
*.sln
21+
*.sw*

.postcssrc.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
plugins: {
3+
autoprefixer: {}
4+
}
5+
}

.prettierrc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"semi": false,
3+
"singleQuote": true
4+
}

LICENSE

-21
This file was deleted.

README.md

+26-117
Original file line numberDiff line numberDiff line change
@@ -1,135 +1,44 @@
11
# vue-multiple-pages
22

3-
**A modern Vue.js multiple pages cli which uses Vue 2, Webpack4, and Element-UI**
3+
## A multiple Pages Starter use Vue-cli3
44

5-
## Features
5+
## Project setup
66

7-
1. [Vue2](https://github.com/vuejs/vue)
8-
2. [Webpack4](https://github.com/webpack/webpack)
9-
3. [ElementUI](https://github.com/ElemeFE/element)
10-
4. [Postcss](https://github.com/postcss/postcss)([autoprefixer](https://github.com/postcss/autoprefixer) default)
11-
5. [Less](http://lesscss.org/)
12-
6. [Sass](https://github.com/webpack-contrib/sass-loader)
7+
download and:
138

14-
## Get Started
15-
16-
### [vue-cli2](https://github.com/vuejs/vue-cli)
17-
18-
#### Init Project
19-
20-
``` bash
21-
$ npm install -g vue-cli
22-
$ vue init Plortinus/vue-multiple-pages new-project
23-
$ cd new-project
24-
$ npm install
259
```
26-
27-
#### Dev
28-
29-
```bash
30-
# serve with hot reload at localhost:8010
31-
$ npm run dev
10+
npm install
11+
```
12+
### Compiles and hot-reloads for development
13+
```
14+
npm run serve
3215
```
3316

34-
visit [http://localhost:8010/user/login.html](http://localhost:8010/user/login.html)
35-
36-
visit [http://localhost:8010/user/index.html](http://localhost:8010/user/index.html)
37-
38-
visit [http://localhost:8010/customer/index.html](http://localhost:8010/customer/index.html)
39-
40-
#### Build
4117

42-
```bash
43-
$ npm run build
44-
$ node server.js #listen 2333 port
18+
### Compiles and minifies for production
19+
```
20+
npm run build
4521
```
4622

47-
visit [http://localhost:2333/user/login.html](http://localhost:2333/user/login.html)
48-
49-
visit [http://localhost:2333/user/index.html](http://localhost:2333/user/index.html)
23+
### Lints and fixes files
24+
```
25+
npm run lint
26+
```
5027

51-
visit [http://localhost:2333/customer/index.html](http://localhost:2333/customer/index.html)
28+
### Modify Page Title
5229

30+
In the root folder `title.js`.
5331

54-
## Folder Structure
32+
Code likes:
5533

56-
```bash
57-
.
58-
├── README.md
59-
├── build // webpack config
60-
│   ├── webpack.base.conf.js
61-
│   ├── webpack.dev.conf.js
62-
│   └── webpack.prod.conf.js
63-
├── dist // dist
64-
│   ├── assets
65-
│   │   ├── css
66-
│   │   │   ├── commons.css
67-
│   │   │   ├── commons.css.map
68-
│   │   │   ├── customer
69-
│   │   │   │   ├── home.css
70-
│   │   │   │   ├── home.css.map
71-
│   │   │   │   ├── home2.css
72-
│   │   │   │   └── home2.css.map
73-
│   │   │   └── user
74-
│   │   │   ├── index.css
75-
│   │   │   ├── index.css.map
76-
│   │   │   ├── login.css
77-
│   │   │   └── login.css.map
78-
│   │   ├── img
79-
│   │   │   └── element-icons.6f0a763.ttf
80-
│   │   └── js
81-
│   │   ├── commons.js
82-
│   │   ├── commons.js.map
83-
│   │   ├── customer
84-
│   │   │   ├── home.js
85-
│   │   │   ├── home.js.map
86-
│   │   │   ├── home2.js
87-
│   │   │   └── home2.js.map
88-
│   │   └── user
89-
│   │   ├── index.js
90-
│   │   ├── index.js.map
91-
│   │   ├── login.js
92-
│   │   └── login.js.map
93-
│   ├── customer
94-
│   │   ├── home.html
95-
│   │   └── home2.html
96-
│   ├── logo.png
97-
│   └── user
98-
│   ├── index.html
99-
│   └── login.html
100-
├── package.json
101-
├── postcss.config.js
102-
├── server.js
103-
└── src
104-
├── assets
105-
│   ├── css
106-
│   └── img
107-
│   └── logo.png
108-
├── components
109-
│   └── modal.vue
110-
└── pages
111-
├── customer
112-
│   ├── home
113-
│   │   ├── app.html
114-
│   │   ├── app.js
115-
│   │   └── app.vue
116-
│   └── home2
117-
│   ├── app.html
118-
│   ├── app.js
119-
│   └── app.vue
120-
└── user
121-
├── index
122-
│   ├── app.html
123-
│   ├── app.js
124-
│   └── app.vue
125-
└── login
126-
├── app.html
127-
├── app.js
128-
└── app.vue
34+
```
35+
{
36+
index: '主页',
37+
'user/login': '登录',
38+
'customer/home': '用户首页'
39+
}
12940
```
13041

131-
## Inspired by [element-starter](https://github.com/ElementUI/element-starter)
132-
133-
## License
42+
### More Config
13443

135-
MIT
44+
[Vue-cli 3](https://cli.vuejs.org/)

babel.config.js

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

meta.js

-28
This file was deleted.

0 commit comments

Comments
 (0)