Skip to content
Philip Callender edited this page Nov 14, 2017 · 3 revisions

Vue is a simple, but highly effective browser framework.

The creator Even You was involved in the development of AngularJS, but left and created Vue because he felt that Angular was becoming too heavy. He implemented Vue as a simple core, and the ability to add extra libraries on top.

We build Vue applications using code from the following projects:

Vue - core library
Vuex - centralized state management
Vue-router2 - routing between pages
Axios - HTTP client

Creating Components

See https://github.com/InCuca/vue-standalone-component
Also https://vuejsfeed.com/blog/vue-cli-template-to-build-components-with-livecoding-tests-documentation-more

$ npm install -g vue-cli
$ cd /Development/Projects
$ vue init InCuca/vue-standalone-component my-component
$ cd my-component
$ yarn install
$ npm run serve

Flow

Flow is a static Javascript type checking package that will detect many errors at build time, rather than at runtime. For example, passing the wrong types of parameters to a function will produce an error.

It's simpler than TypeScript, but provides many of the same benefits. Documentation here.

Instructions here.

In .eslintrv

{
  ...
  "extends": [
    "plugin:vue-libs/recommended",
    "plugin:flowtype/recommended"
  ],
  ...
}

To specify that it's used in a Javascript file:

/* @flow */

Using Pug in *.vue

See https://vue-loader.vuejs.org/en/configurations/pre-processors.html

$ npm install pug --save-dev

Using Sass in *.vue

See https://vue-loader.vuejs.org/en/configurations/pre-processors.html

$ npm install sass-loader node-sass --save-dev

POI

This is a utility that simplifies Vue/Webpack/Babel. See https://github.com/egoist/poi

Clone this wiki locally