Files: 85263b1a2e09412286cff61943bf76efb4225984 / ui.js
641 bytesRaw
1 | const combine = require('depject') |
2 | const entry = require('depject/entry') |
3 | const nest = require('depnest') |
4 | const values = require('lodash/values') |
5 | |
6 | const { patchcore, patchbay, plugins, configModule } = require('./exports') |
7 | |
8 | function Start (config = {}) { |
9 | // polyfills |
10 | require('setimmediate') |
11 | |
12 | const sockets = combine( |
13 | ...values(plugins), // TODO spin up settings check which modules are wanted |
14 | configModule(config), |
15 | patchbay, |
16 | patchcore |
17 | ) |
18 | // plugins loaded first will over-ride core modules loaded later |
19 | |
20 | const api = entry(sockets, nest('app.sync.start', 'first')) |
21 | api.app.sync.start() |
22 | } |
23 | |
24 | module.exports = Start |
25 |
Built with git-ssb-web