vue-sensor
v0.0.2
Published
A Vue.js Plugin
Downloads
9
Readme
VueSensor
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