git ssb

16+

Dominic / patchbay



Tree: 916bd66722dcbec3a08c1049de38ed0d17a92cc6

Files: 916bd66722dcbec3a08c1049de38ed0d17a92cc6 / main.js

1236 bytesRaw
1const combine = require('depject')
2const entry = require('depject/entry')
3const nest = require('depnest')
4const bulk = require('bulk-require')
5
6// polyfills
7require('setimmediate')
8
9const patchbay = {
10 patchbay: {
11 about: bulk(__dirname, [ 'about/**/*.js' ]),
12 app: bulk(__dirname, [ 'app/**/*.js' ]),
13 blob: bulk(__dirname, [ 'blob/**/*.js' ]),
14 channel: bulk(__dirname, [ 'channel/**/*.js' ]),
15 contact: bulk(__dirname, [ 'contact/**/*.js' ]),
16 message: bulk(__dirname, [ 'message/**/*.js' ]),
17 router: bulk(__dirname, [ 'router/**/*.js' ]),
18 styles: bulk(__dirname, [ 'styles/**/*.js' ]),
19
20 config: require('./config'), // shouldn't be in here ?
21 contextMenu: require('patch-context'),
22 }
23}
24
25
26// from more specialized to more general
27const sockets = combine(
28 //require('ssb-horcrux'),
29 //require('patch-hub'),
30 require('ssb-chess'),
31 require('patchbay-gatherings'),
32 require('patch-inbox'),
33 require('patch-history'),
34 require('patch-settings'),
35 patchbay,
36 require('patchcore')
37)
38
39const api = entry(sockets, nest('app.html.app', 'first'))
40const app = api.app.html.app
41
42module.exports = patchbay
43
44// for electro[n]
45if (typeof window !== 'undefined') {
46 document.body.appendChild(app())
47}
48
49

Built with git-ssb-web