git ssb

16+

Dominic / patchbay



Tree: dfab72629c4a2041faa87cedfbb83f92d52a8cd7

Files: dfab72629c4a2041faa87cedfbb83f92d52a8cd7 / main.js

1390 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 suggestions: require('patch-suggest'),
23 inbox: require('patch-inbox'),
24 history: require('patch-history'),
25 }
26}
27
28
29// from more specialized to more general
30const sockets = combine(
31 //require('ssb-horcrux'),
32 //require('patch-hub'),
33
34 require('ssb-chess'),
35 require('patchbay-gatherings'),
36 require('patchbay-book'),
37 // require('patch-network),
38 require('patch-settings'), // might need to be in patchbay
39 patchbay,
40 require('patchcore')
41)
42
43const api = entry(sockets, nest('app.html.app', 'first'))
44const app = api.app.html.app
45
46module.exports = patchbay
47
48// for electro[n]
49if (typeof window !== 'undefined') {
50 document.body.appendChild(app())
51}
52
53

Built with git-ssb-web