A modified vue-cli template with additional some options, forked from the official vue-webpack-boilerplate and Alex's vue-webpack-boilerplate.
- Just read the offical documents. It's the same.
- Vuex included.
- LESS and LESS-loader included.
- rem solution included, base on lib-flexible and px2rem-postcss, Click px2rem for more configurations.
- sprite image solution included, base on postcss-sprites, Click spritesmith for more configurations.
- imagemin solution included, base on img-loader, Click imagemin for more configurations.
- assets preload solution included.
- Customized port for development environment. The default port is 9001.
This is a project template for vue-cli. It is recommended to use npm 3+ for a more efficient dependency tree.
$ npm install -g vue-cli
$ vue init fengrunda/vue-cli-webpack my-project
$ cd my-project
$ npm install
$ npm run dev
Webpack uses port 9001 on default. Also,You can change it in /config/index.js
. Just like the official template, if the port is already used, npm run dev
will fail.
Besides npm run dev
, these scripts also included:
npm run build
: Production ready build.npm run unit
: Unit tests run in PhantomJS with Karma + Mocha + karma-webpack.npm run e2e
: End-to-end tests with Nightwatch.