2.2.0 • Published 6 years ago

vue-standalone-component v2.2.0

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

vue-standalone-component

Travis

Vuejs standalone component template using karma for testing

Build your standalone components using this tiny template.

This template is Vue 2.x only.

npm.io

Usage

This is a project template for vue-cli.

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

The generated output in ./dist can be used with node and the browser.

PS: to build to UMD run npm run build:umd

What's Included

Linting

$ npm run lint

Testing & Test Coverage

$ npm run test
$ npm run test:watch
$ npm run test:cov

Building

ES6 Modules / CommonJS

$ npm run build
import myCmp from 'dist/my-cmp';

Vue.component('my-cmp', myCmp);

UMD

$ npm run build:umd
<script src="https://unpkg.com/vue" charset="utf-8"></script>
<script src="./dist/my-cmp.min.js" charset="utf-8"></script>

<script type="text/javascript">
  Vue.component('my-cmp', window.MyCmp.default);
</script>
2.2.0

6 years ago

2.1.0

6 years ago

2.0.0

6 years ago

1.0.8

6 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.3

7 years ago