/vue-component-boilerplate

boilerplate for a standalone vue-component

Primary LanguageVue

vue-component-boilerplate

A full-featured component setup with hot-reload, lint-on-save & unit testing.

Version Notice

Requires vue-cli@2.x

Usage

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 paulpflug/vue-component-boilerplate my-project
$ cd my-project
$ npm install
$ npm run dev

What's Included

  • npm run dev: first-in-class development experience.

    • Webpack + vue-loader for single file Vue components.
    • State preserving hot-reload
    • State preserving compilation error overlay
    • Lint-on-save with ESLint
    • Source maps
  • npm run build: Production ready build.

  • npm run test: Unit tests run in PhantomJS with Karma + Mocha + karma-webpack.

    • Supports ES2015 in test files.
    • Supports all webpack loaders.
    • Easy mock injection.