0.0.2 • Published 7 years ago

vue-sensor v0.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

VueSensor

npm vue2

A Vue.js Plugin

Installation

npm install --save vue-sensor

Usage

Bundler (Webpack, Rollup)

import Vue from 'vue'
import VueSensor from 'vue-sensor'

Vue.use(VueSensor, {,
  trackHandle: (e) => {
    // implementation
    
    console.log(e)
  }
})
<button v-sensor:click="{value: 'hello'}">Click me</button>

Browser

<!-- Include after Vue -->
<!-- Local files -->
<script src="vue-sensor/dist/vue-sensor.js"></script>

<!-- From CDN -->
<script src="https://unpkg.com/vue-sensor"></script>

Development

Launch visual tests

npm run dev

Launch Karma with coverage

npm run dev:coverage

Build

Bundle the js and css of to the dist folder:

npm run build

License

MIT