Deploy 12.0.3
This commit is contained in:
parent
9e9f238b12
commit
b8dd7d1862
@ -38,3 +38,15 @@ Y({
|
||||
y.share.richtext.bind(window.quill)
|
||||
})
|
||||
|
||||
Y({
|
||||
db: {
|
||||
name: 'indexeddb'
|
||||
},
|
||||
connector: {
|
||||
name: 'websockets-client',
|
||||
room: 'test42'
|
||||
},
|
||||
share: {
|
||||
state : 'Map'
|
||||
}
|
||||
}).then((y) => { window.y = y })
|
13
README.md
13
README.md
@ -71,6 +71,19 @@ require('y-text')(Y)
|
||||
// do the same for all modules you want to use
|
||||
```
|
||||
|
||||
### ES6 Syntax
|
||||
```
|
||||
import Y from 'yjs'
|
||||
import yArray from 'y-array'
|
||||
import yWebsocketsClient from 'y-webrtc'
|
||||
import yMemory from 'y-memory'
|
||||
import yArray from 'y-array'
|
||||
import yMap from 'y-map'
|
||||
import yText from 'y-text'
|
||||
// ..
|
||||
Y.extend(yArray, yWebsocketsClient, yMemory, yArray, yMap, yText /*, .. */)
|
||||
```
|
||||
|
||||
# Text editing example
|
||||
Install dependencies
|
||||
```
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "yjs",
|
||||
"version": "12.0.2",
|
||||
"version": "12.0.3",
|
||||
"homepage": "y-js.org",
|
||||
"authors": [
|
||||
"Kevin Jahns <kevin.jahns@rwth-aachen.de>"
|
||||
|
25
y.es6
25
y.es6
@ -3416,14 +3416,25 @@ module.exports = Y
|
||||
Y.requiringModules = requiringModules
|
||||
|
||||
Y.extend = function (name, value) {
|
||||
if (value instanceof Y.utils.CustomTypeDefinition) {
|
||||
Y[name] = value.parseArguments
|
||||
if (arguments.length === 2 && typeof name === 'string') {
|
||||
if (value instanceof Y.utils.CustomTypeDefinition) {
|
||||
Y[name] = value.parseArguments
|
||||
} else {
|
||||
Y[name] = value
|
||||
}
|
||||
if (requiringModules[name] != null) {
|
||||
requiringModules[name].resolve()
|
||||
delete requiringModules[name]
|
||||
}
|
||||
} else {
|
||||
Y[name] = value
|
||||
}
|
||||
if (requiringModules[name] != null) {
|
||||
requiringModules[name].resolve()
|
||||
delete requiringModules[name]
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
var f = arguments[i]
|
||||
if (typeof f === 'function') {
|
||||
f(Y)
|
||||
} else {
|
||||
throw new Error('Expected function!')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user