├── static └── .gitkeep ├── .gitignore ├── config ├── prod.env.js ├── dev.env.js └── index.js ├── .npmrc ├── .editorconfig ├── .babelrc ├── README.md ├── src ├── main.js └── components │ ├── About.vue │ └── Index.vue ├── index.html ├── index.tpl.html ├── package.json └── yarn.lock /static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | dist/ 4 | npm-debug.log 5 | -------------------------------------------------------------------------------- /config/prod.env.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | NODE_ENV: '"production"' 3 | } 4 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | phantomjs_cdnurl=http://cnpmjs.org/downloads 2 | sass_binary_site=https://npm.taobao.org/mirrors/node-sass/ 3 | registry=https://registry.npm.taobao.org 4 | -------------------------------------------------------------------------------- /config/dev.env.js: -------------------------------------------------------------------------------- 1 | var merge = require('webpack-merge') 2 | var prodEnv = require('./prod.env') 3 | 4 | module.exports = merge(prodEnv, { 5 | NODE_ENV: '"development"' 6 | }) 7 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["es2015", { "modules": false }], 4 | "stage-2" 5 | ], 6 | "plugins": ["transform-runtime"], 7 | "comments": false, 8 | "env": { 9 | "test": { 10 | "plugins": [ "istanbul" ] 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # How to Use 2 | 3 | - quick start 4 | 5 | ``` bash 6 | git clone https://github.com/wangdahoo/vonic-webpack-starter.git 7 | cd vonic-webpack-starter 8 | npm install -g yarn 9 | yarn 10 | ``` 11 | 12 | - development 13 | 14 | ```bash 15 | npm run dev 16 | ``` 17 | 18 | - build 19 | 20 | ```bash 21 | npm run build 22 | ``` 23 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vonic from 'vonic' 3 | 4 | // Page Components 5 | import Index from './components/Index.vue' 6 | import About from './components/About.vue' 7 | 8 | // Routes 9 | const routes = [ 10 | { path: '/', component: Index }, 11 | { path: '/about', component: About } 12 | ] 13 | 14 | Vue.use(Vonic.app, { 15 | routes: routes 16 | }) 17 | -------------------------------------------------------------------------------- /src/components/About.vue: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 17 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 |