Skip to content

Commit

Permalink
Break Changes use Vue-cli3 fixed #65
Browse files Browse the repository at this point in the history
  • Loading branch information
Plortinus committed Aug 13, 2018
1 parent 70c652f commit 8b146b8
Show file tree
Hide file tree
Showing 46 changed files with 20,012 additions and 763 deletions.
3 changes: 3 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
> 1%
last 2 versions
not ie <= 8
17 changes: 17 additions & 0 deletions .eslintrc.js
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'
}
}
22 changes: 19 additions & 3 deletions .gitignore
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*
5 changes: 5 additions & 0 deletions .postcssrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
plugins: {
autoprefixer: {}
}
}
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"semi": false,
"singleQuote": true
}
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

143 changes: 26 additions & 117 deletions README.md
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/)
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: ["@vue/app"]
};
28 changes: 0 additions & 28 deletions meta.js

This file was deleted.

Loading

0 comments on commit 8b146b8

Please sign in to comment.