-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Break Changes use Vue-cli3 fixed #65
- Loading branch information
Showing
46 changed files
with
20,012 additions
and
763 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
> 1% | ||
last 2 versions | ||
not ie <= 8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
node: true | ||
}, | ||
'extends': [ | ||
'plugin:vue/essential', | ||
'@vue/prettier' | ||
], | ||
rules: { | ||
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', | ||
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' | ||
}, | ||
parserOptions: { | ||
parser: 'babel-eslint' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,21 @@ | ||
.DS_Store | ||
node_modules/ | ||
dist/ | ||
npm-debug.log | ||
node_modules | ||
/dist | ||
|
||
# local env files | ||
.env.local | ||
.env.*.local | ||
|
||
# Log files | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Editor directories and files | ||
.idea | ||
.vscode | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
plugins: { | ||
autoprefixer: {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"semi": false, | ||
"singleQuote": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,135 +1,44 @@ | ||
# vue-multiple-pages | ||
|
||
**A modern Vue.js multiple pages cli which uses Vue 2, Webpack4, and Element-UI** | ||
## A multiple Pages Starter use Vue-cli3 | ||
|
||
## Features | ||
## Project setup | ||
|
||
1. [Vue2](https://github.com/vuejs/vue) | ||
2. [Webpack4](https://github.com/webpack/webpack) | ||
3. [ElementUI](https://github.com/ElemeFE/element) | ||
4. [Postcss](https://github.com/postcss/postcss)([autoprefixer](https://github.com/postcss/autoprefixer) default) | ||
5. [Less](http://lesscss.org/) | ||
6. [Sass](https://github.com/webpack-contrib/sass-loader) | ||
download and: | ||
|
||
## Get Started | ||
|
||
### [vue-cli2](https://github.com/vuejs/vue-cli) | ||
|
||
#### Init Project | ||
|
||
``` bash | ||
$ npm install -g vue-cli | ||
$ vue init Plortinus/vue-multiple-pages new-project | ||
$ cd new-project | ||
$ npm install | ||
``` | ||
|
||
#### Dev | ||
|
||
```bash | ||
# serve with hot reload at localhost:8010 | ||
$ npm run dev | ||
npm install | ||
``` | ||
### Compiles and hot-reloads for development | ||
``` | ||
npm run serve | ||
``` | ||
|
||
visit [http://localhost:8010/user/login.html](http://localhost:8010/user/login.html) | ||
|
||
visit [http://localhost:8010/user/index.html](http://localhost:8010/user/index.html) | ||
|
||
visit [http://localhost:8010/customer/index.html](http://localhost:8010/customer/index.html) | ||
|
||
#### Build | ||
|
||
```bash | ||
$ npm run build | ||
$ node server.js #listen 2333 port | ||
### Compiles and minifies for production | ||
``` | ||
npm run build | ||
``` | ||
|
||
visit [http://localhost:2333/user/login.html](http://localhost:2333/user/login.html) | ||
|
||
visit [http://localhost:2333/user/index.html](http://localhost:2333/user/index.html) | ||
### Lints and fixes files | ||
``` | ||
npm run lint | ||
``` | ||
|
||
visit [http://localhost:2333/customer/index.html](http://localhost:2333/customer/index.html) | ||
### Modify Page Title | ||
|
||
In the root folder `title.js`. | ||
|
||
## Folder Structure | ||
Code likes: | ||
|
||
```bash | ||
. | ||
├── README.md | ||
├── build // webpack config | ||
│ ├── webpack.base.conf.js | ||
│ ├── webpack.dev.conf.js | ||
│ └── webpack.prod.conf.js | ||
├── dist // dist | ||
│ ├── assets | ||
│ │ ├── css | ||
│ │ │ ├── commons.css | ||
│ │ │ ├── commons.css.map | ||
│ │ │ ├── customer | ||
│ │ │ │ ├── home.css | ||
│ │ │ │ ├── home.css.map | ||
│ │ │ │ ├── home2.css | ||
│ │ │ │ └── home2.css.map | ||
│ │ │ └── user | ||
│ │ │ ├── index.css | ||
│ │ │ ├── index.css.map | ||
│ │ │ ├── login.css | ||
│ │ │ └── login.css.map | ||
│ │ ├── img | ||
│ │ │ └── element-icons.6f0a763.ttf | ||
│ │ └── js | ||
│ │ ├── commons.js | ||
│ │ ├── commons.js.map | ||
│ │ ├── customer | ||
│ │ │ ├── home.js | ||
│ │ │ ├── home.js.map | ||
│ │ │ ├── home2.js | ||
│ │ │ └── home2.js.map | ||
│ │ └── user | ||
│ │ ├── index.js | ||
│ │ ├── index.js.map | ||
│ │ ├── login.js | ||
│ │ └── login.js.map | ||
│ ├── customer | ||
│ │ ├── home.html | ||
│ │ └── home2.html | ||
│ ├── logo.png | ||
│ └── user | ||
│ ├── index.html | ||
│ └── login.html | ||
├── package.json | ||
├── postcss.config.js | ||
├── server.js | ||
└── src | ||
├── assets | ||
│ ├── css | ||
│ └── img | ||
│ └── logo.png | ||
├── components | ||
│ └── modal.vue | ||
└── pages | ||
├── customer | ||
│ ├── home | ||
│ │ ├── app.html | ||
│ │ ├── app.js | ||
│ │ └── app.vue | ||
│ └── home2 | ||
│ ├── app.html | ||
│ ├── app.js | ||
│ └── app.vue | ||
└── user | ||
├── index | ||
│ ├── app.html | ||
│ ├── app.js | ||
│ └── app.vue | ||
└── login | ||
├── app.html | ||
├── app.js | ||
└── app.vue | ||
``` | ||
{ | ||
index: '主页', | ||
'user/login': '登录', | ||
'customer/home': '用户首页' | ||
} | ||
``` | ||
|
||
## Inspired by [element-starter](https://github.com/ElementUI/element-starter) | ||
|
||
## License | ||
### More Config | ||
|
||
MIT | ||
[Vue-cli 3](https://cli.vuejs.org/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
presets: ["@vue/app"] | ||
}; |
Oops, something went wrong.