git ssb

16+

Dominic / patchbay



Tree: a5b19e9a7af23f8f2cfcf33116137fad4143479b

Files: a5b19e9a7af23f8f2cfcf33116137fad4143479b / main.js

1617 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 patchcore = require('patchcore')
10delete patchcore.patchcore.message.html.action.reply
11// prune an action we don't want
12
13const patchbay = {
14 patchbay: {
15 about: bulk(__dirname, [ 'about/**/*.js' ]),
16 app: bulk(__dirname, [ 'app/**/*.js' ]),
17 blob: bulk(__dirname, [ 'blob/**/*.js' ]),
18 channel: bulk(__dirname, [ 'channel/**/*.js' ]),
19 contact: bulk(__dirname, [ 'contact/**/*.js' ]),
20 message: bulk(__dirname, [ 'message/**/*.js' ]),
21 router: bulk(__dirname, [ 'router/**/*.js' ]),
22 styles: bulk(__dirname, [ 'styles/**/*.js' ]),
23 sbot: bulk(__dirname, [ 'sbot/**/*.js' ]),
24
25 config: require('./config'), // shouldn't be in here ?
26 contextMenu: require('patch-context'),
27 suggestions: require('patch-suggest'),
28 settings: require('patch-settings'),
29 drafts: require('patch-drafts'),
30 history: require('patch-history')
31 }
32}
33module.exports = patchbay
34
35// for electro[n]
36if (typeof window !== 'undefined') {
37 // modules loaded first over-ride core modules loaded later
38 const sockets = combine(
39 require('patchbay-scry'),
40 require('patchbay-dark-crystal'),
41 require('patchbay-poll'),
42 require('ssb-chess-mithril'),
43 require('patchbay-gatherings'),
44 require('patchbay-book'),
45 require('patch-inbox'), // TODO needs work
46 patchbay,
47 patchcore
48 )
49
50 const api = entry(sockets, nest('app.html.app', 'first'))
51 document.body.appendChild(api.app.html.app())
52}
53

Built with git-ssb-web