Skip to content

Commit 7e3ae5e

Browse files
UMD bundle with P2P export constructor
1 parent 1447db2 commit 7e3ae5e

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ p2p.on('peer-msg', function(data){
2727
});
2828
```
2929

30+
If you're not using browserify, then use the included standalone file `socketiop2p.min.js`. This exports a `P2P` constructor on `window`.
31+
3032
On the server, use the [socket.io-p2p-server](https://github.com/tomcartwrightuk/socket.io-p2p-server) to take care of signalling. All clients who support WebRTC data connections will exchange signalling data via the default `/` namespace.
3133

3234
```js

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"tape": "~3.0.0"
4444
},
4545
"scripts": {
46-
"test": "zuul -- test/specs/*.js"
46+
"test": "zuul local 8000 -- test/specs/*.js",
47+
"build": "browserify -s P2P -r ./ | uglifyjs -m > socketiop2p.min.js"
4748
}
4849
}

0 commit comments

Comments
 (0)