spacebro-client
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -9,4 +9,9 @@ 'use strict'; | ||
function registerToMaster(actionList, clientName, zeroconfName) { | ||
console.log('Wating for spacebro...'); | ||
mdns.connectToService(zeroconfName || 'spacebro', function socketioInit(err, address, port) { | ||
console.log('service found: ', address); | ||
if (err) { | ||
console.log(err.stack); | ||
} | ||
console.log('---------------------------'); | ||
console.log('service found at address: ', address); | ||
socket = io('http://' + address + ':' + port).on('connect', function () { | ||
@@ -19,2 +24,3 @@ console.log('socketio connected to ' + 'http://' + address + ':' + port); | ||
}); | ||
console.log('List of actions registered:'); | ||
var _iteratorNormalCompletion = true; | ||
@@ -53,2 +59,4 @@ var _didIteratorError = false; | ||
} | ||
console.log('---------------------------'); | ||
}); | ||
@@ -55,0 +63,0 @@ } |
@@ -20,3 +20,3 @@ 'use strict' | ||
browser.on('serviceUp', function (service) { | ||
console.log('service up: ', service.type.name) | ||
// console.log('service up: ', service.type.name) | ||
if (_.findWhere(services, { | ||
@@ -27,3 +27,3 @@ name: service.type.name, | ||
}) === undefined) { | ||
console.log('New socket.io connection with service "' + service.type.name + '" on: ' + service.host.substr(0, service.host.length - 1) + ':' + service.port) | ||
// console.log('New socket.io connection with service "' + service.type.name + '" on: ' + service.host.substr(0, service.host.length - 1) + ':' + service.port) | ||
services.push({ | ||
@@ -30,0 +30,0 @@ name: service.type.name, |
{ | ||
"name": "spacebro-client", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "Allow to automagically 🌟 connect to a Spacebro server", | ||
@@ -9,3 +9,4 @@ "main": "build/index.js", | ||
"example": "node ./example/index-example.js", | ||
"build": "babel src -d build" | ||
"build": "babel src -d build", | ||
"start": "node ./example/index-example.js" | ||
}, | ||
@@ -12,0 +13,0 @@ "repository": { |
@@ -44,1 +44,7 @@ # Spacebro client | ||
Enjoy ! | ||
Please follow [standard style](https://github.com/feross/standard) conventions. | ||
## Contribute | ||
You can modify the source in `src/index.js`. Run `npm run build` to transpile and test. |
@@ -9,4 +9,9 @@ 'use strict' | ||
function registerToMaster (actionList, clientName, zeroconfName) { | ||
console.log('Wating for spacebro...') | ||
mdns.connectToService(zeroconfName || 'spacebro', function socketioInit (err, address, port) { | ||
console.log('service found: ', address) | ||
if (err) { | ||
console.log(err.stack) | ||
} | ||
console.log('---------------------------') | ||
console.log('service found at address: ', address) | ||
socket = io('http://' + address + ':' + port) | ||
@@ -20,2 +25,3 @@ .on('connect', function () { | ||
}) | ||
console.log('List of actions registered:') | ||
for (let action of actionList) { | ||
@@ -29,2 +35,3 @@ console.log(action.name) | ||
} | ||
console.log('---------------------------') | ||
}) | ||
@@ -31,0 +38,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9458
164
49