Release 0.8.3
This commit is contained in:
parent
ece8268e44
commit
102555a3b0
2
dist
2
dist
@ -1 +1 @@
|
||||
Subproject commit a77eb39218a5815854daa07373f7f4597c3b9cb9
|
||||
Subproject commit 3b8e148d8fee752b6318df2b940316c77936b812
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "yjs",
|
||||
"version": "0.8.3",
|
||||
"version": "0.8.4",
|
||||
"description": "A framework for real-time p2p shared editing on arbitrary complex data types",
|
||||
"main": "./src/y.js",
|
||||
"scripts": {
|
||||
|
9
src/y.js
9
src/y.js
@ -93,8 +93,9 @@ function Y (opts/* :YOptions */) /* :Promise<YConfig> */ {
|
||||
Y.sourceDir = opts.sourceDir
|
||||
return Y.requestModules(modules).then(function () {
|
||||
return new Promise(function (resolve) {
|
||||
var yconfig = new YConfig(opts, function () {
|
||||
yconfig.db.whenUserIdSet(function () {
|
||||
var yconfig = new YConfig(opts)
|
||||
yconfig.db.whenUserIdSet(function () {
|
||||
yconfig.init(function () {
|
||||
resolve(yconfig)
|
||||
})
|
||||
})
|
||||
@ -111,6 +112,10 @@ class YConfig {
|
||||
constructor (opts, callback) {
|
||||
this.db = new Y[opts.db.name](this, opts.db)
|
||||
this.connector = new Y[opts.connector.name](this, opts.connector)
|
||||
this.options = opts
|
||||
}
|
||||
init (callback) {
|
||||
var opts = this.options
|
||||
var share = {}
|
||||
this.share = share
|
||||
this.db.requestTransaction(function * requestTransaction () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user