Skip to content

Commit a5cb9ef

Browse files
committed
added plugin runtime installer
1 parent 151275e commit a5cb9ef

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

src/core/Block.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const Block = function (blocksElement, blockConfig) {
88
return new Promise((resolve, reject) => {
99
that.type = blockConfig.aliasType || blockConfig.type
1010
that.index = blockConfig._index
11-
var blockInstance = null
11+
let blockInstance = null
1212
const sceneConfig = blockConfig._sceneConfig || {}
1313

1414
blockConfig.contextType = 'block'

src/core/Install.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ const Install = function (config) {
6060
resolve()
6161
}
6262
}
63-
64-
// if (len === 0) resolve()
6563
})
6664
})
6765
}

src/index.js

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import utils from './utils'
1313
import defaults from './utils/defaults'
1414
import validate from './utils/validate'
1515

16-
// import { Install } from './core/Install.js'
16+
import { Install } from './core/Install.js'
1717
import pluginsInit from './utils/pluginsInit'
1818

1919
const Presenta = function (el, config) {
@@ -42,13 +42,13 @@ const Presenta = function (el, config) {
4242
const splash = new Splash(root, config)
4343

4444
return new Promise((resolve, reject) => {
45-
// new Install(config.plugins).then(() => {
46-
const all = pluginsInit(config)
47-
Promise.all(all).then(values => {
48-
resolve(new Container(root, config))
49-
splash.destroy()
45+
new Install(config.plugins).then(() => {
46+
const all = pluginsInit(config)
47+
Promise.all(all).then(values => {
48+
resolve(new Container(root, config))
49+
splash.destroy()
50+
})
5051
})
51-
// })
5252
})
5353
}
5454

@@ -60,9 +60,6 @@ Presenta.addModule = addModule
6060

6161
Presenta.installed = { controllers, modules, blocks }
6262

63-
// Presenta.addGlob = utils.addGlob
64-
// Presenta.addProp = utils.addProp
65-
6663
Presenta.io = utils.io
6764

6865
Presenta.use = plugin => {

0 commit comments

Comments
 (0)