spa-reloader-vue

0.0.12 • Public • Published

SPA Reloader for Vue

FOSSA Status NPM version

Vue Plugin for SPA Reloader.

Setup

To add SPA Reloader Plugin to your Vue project, execute:

# npm
npm i spa-reloader-vue
# yarn
yarn add spa-reloader-vue

Import the package in main.js:

// main.js
import SpaReloaderVue from "spa-reloader-vue";

To use it, the plugin needs the 'spaReloaderURL' with the websocket server ip and port.

Vue.use(SpaReloaderVue, { spaReloaderURL: "ws://192.168.1.143:8081" });

Add a new callback function to be executed every time an image update event is caught, by calling this method:

// everywhere
this.$spaSubscribe(this.myCallbackFunction);

Demo

Please, take a look at the Demo Project here.

License

FOSSA Status

Package Sidebar

Install

npm i spa-reloader-vue

Weekly Downloads

5

Version

0.0.12

License

Apache-2.0

Unpacked Size

221 kB

Total Files

10

Last publish

Collaborators

  • jorgevillaverde
  • fferz