updated package.json, major version upgrade, added peerDependencies

This commit is contained in:
Kevin Jahns 2016-02-23 15:55:40 +01:00
parent 18ccf7134d
commit 982a8152a3
6 changed files with 51 additions and 65 deletions

1
.gitignore vendored
View file

@ -11,3 +11,4 @@ build_test
/y.js /y.js
/y.js.map /y.js.map
/y-* /y-*
.vscode

21
LICENSE Normal file
View file

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2014 Kevin Jahns <kevin.jahns@rwth-aachen.de>.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -1,6 +1,5 @@
# WebRTC Connector for [Yjs](https://github.com/y-js/yjs) # WebRTC Connector for [Yjs](https://github.com/y-js/yjs)
It propagates document updates directly to all users via WebRTC. While WebRTC is not the most reliable connector, messages are propagated with almost no delay. It propagates document updates directly to all users via WebRTC. While WebRTC is not the most reliable connector, messages are propagated with almost no delay.
* Very fast message propagation (not noticeable) * Very fast message propagation (not noticeable)
@ -18,52 +17,39 @@ Retrieve this with bower or npm, and use it as a js library or as a custom polym
``` ```
npm install y-webrtc --save npm install y-webrtc --save
``` ```
and put it on the `Y` object.
```
Y.WebRTC = require("y-webrtc");
```
##### Bower ##### Bower
``` ```
bower install y-webrtc --save bower install y-webrtc --save
``` ```
##### Polymer
On the website you find a bunch of examples on how you can use Yjs as polymer element.
```
<link rel="import" href="../y-webrtc/y-webrtc.html">
<y-webrtc connector={{connector}} room="my-room-name"></y-webrtc>
```
### Create the connection object
This connector uses [SimpleWebRTC](https://simplewebrtc.com/) as an underlaying WebRTC framework, which supports the concept of rooms.
```
var options = {};
var conn = new Y.WebRTC("my_room_name", options); // will connect to the default signaling server
```
On the options object you can put the following properties:
* url (optional)
* Set the url of your signaling server. E.g. url = "https://yatta.ninja:8888" (which is the default endpoint)
* debug (optional)
* Whether to enable debugging mode (defaults to false)
# Start Hacking # Start Hacking
This connector is also a nice starting point to build your own connector. The only 75 SLOCs of code are pretty well documented and understandable. If you have any troubles, don't hesitate to ask me for help! This connector is also a nice starting point to build your own connector. The only 75 SLOCs of code are pretty well documented and understandable. If you have any troubles, don't hesitate to ask me for help!
### Directory Structure ### Example
* lib/
* Source files
* build/browser
* Unminified, but [browserified](http://browserify.org/) source files
* build/node
* npm modules
```
Y({
db: {
name: 'memory'
},
connector: {
name: 'webrtc', // choose the webrtc connector
room: 'Textarea-example-dev'
},
sourceDir: '/bower_components', // location of the y-* modules
share: {
textarea: 'Text' // y.share.textarea is of type Y.Text
}
// types: ['Richtext', 'Array'] // optional list of types you want to import
}).then(function (y) {
// bind the textarea to a shared text element
y.share.textarea.bind(document.getElementById('textfield'))
}
```
## License ## License
Yjs is licensed under the [MIT License](./LICENSE.txt). Yjs is licensed under the [MIT License](./LICENSE).
<kevin.jahns@rwth-aachen.de> <kevin.jahns@rwth-aachen.de>

View file

@ -1,27 +0,0 @@
{
"name": "y-webrtc",
"main": "y-webrtc.js",
"version": "0.7.2",
"homepage": "http://y-js.org",
"authors": [
"Kevin Jahns <kevin.jahns@rwth-aachen.de>"
],
"description": "WebRTC connector for Yjs",
"moduleType": [
"globals",
"node"
],
"keywords": [
"Yjs",
"connector",
"webrtc"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
]
}

2
dist

@ -1 +1 @@
Subproject commit bdfd830cb9e8c164c1fd8264b849d91643695d50 Subproject commit 9b0cd580c4e9fe52e28a786dae14c185890d275f

View file

@ -1,6 +1,6 @@
{ {
"name": "y-webrtc", "name": "y-webrtc",
"version": "0.7.2", "version": "8.0.0",
"description": "WebRTC Connector for Yjs", "description": "WebRTC Connector for Yjs",
"main": "./src/WebRTC.js", "main": "./src/WebRTC.js",
"scripts": { "scripts": {
@ -25,7 +25,12 @@
}, },
"keywords": [ "keywords": [
"Yjs", "Yjs",
"Connector" "OT",
"Collaboration",
"Synchronization",
"ShareJS",
"Coweb",
"Concurrency"
], ],
"author": "Kevin Jahns <kevin.jahns@rwth-aachen.de>", "author": "Kevin Jahns <kevin.jahns@rwth-aachen.de>",
"license": "MIT", "license": "MIT",