0.0.2 • Published 8 years ago
vue-sensor v0.0.2
VueSensor
A Vue.js Plugin
Installation
npm install --save vue-sensorUsage
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 devLaunch Karma with coverage
npm run dev:coverageBuild
Bundle the js and css of to the dist folder:
npm run build