From 7abd7f5ace105ab3ddc999a8cb6c14ada491d0bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauris=20Buk=C5=A1is-Haberkorns?= Date: Thu, 1 Nov 2018 18:54:33 +0200 Subject: [PATCH] Switch to nativescript-socketio library --- index.js | 7 ++++--- package.json | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index db7b792..24aed94 100644 --- a/index.js +++ b/index.js @@ -55,9 +55,10 @@ module.exports = function install(Vue, {debug = false, host = null, port = 8098} showToast: (message) => require('nativescript-toast').makeText(message).show(), io() { const address = `http://${getServerIpAddress(host, port)}` - const SocketIO = require('nativescript-socket.io') - debug && SocketIO.enableDebug() - return SocketIO.connect(address) + const SocketIO = require('nativescript-socketio').SocketIO + let socketIO = new SocketIO(address, { debug: debug }) + socketIO.connect() + return socketIO } }) diff --git a/package.json b/package.json index 1b39a3d..7cdb971 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "homepage": "https://github.com/nativescript-vue/nativescript-vue-devtools#readme", "peerDependencies": { "nativescript-toast": "*", - "nativescript-socket.io": "*", + "nativescript-socketio": "*", "tns-core-modules": "*", "@vue/devtools": "*" }