git ssb

2+

mixmix / ticktack



Tree: b10ce2e3fb81fd4e7ded0080858d4a7ff1d508f9

Files: b10ce2e3fb81fd4e7ded0080858d4a7ff1d508f9 / main.js

1288 bytesRaw
1const combine = require('depject')
2const entry = require('depject/entry')
3const nest = require('depnest')
4
5// polyfills
6require('setimmediate')
7
8// add inspect right click menu
9require('./context-menu')
10
11// from more specialized to more general
12const sockets = combine(
13 //need some modules first
14 {
15 settings: require('patch-settings'),
16 translations: require('./translations/sync')
17 },
18 {
19 about: require('./about'),
20 app: require('./app'),
21 blob: require('./blob'),
22 //config: require('./ssb-config'),
23 config: require('./config'),
24 // group: require('./group'),
25 message: require('./message'),
26 router: require('./router'),
27 styles: require('./styles'),
28 state: require('./state/obs'),
29 unread: require('./unread'),
30 },
31 {
32 suggestions: require('patch-suggest'),
33 profile: require('patch-profile'),
34 core: require('patchcore')
35 }
36)
37
38const api = entry(sockets, nest({
39 'app.html.app': 'first',
40 'invite.async.autofollow': 'first',
41 'config.sync.load': 'first'
42}))
43
44document.body.appendChild(api.app.html.app())
45
46var invite = api.config.sync.load().autoinvite
47if(invite)
48 api.invite.async.autofollow(
49 invite,
50 function (err, follows) {
51 console.log('autofollowed', err, follows);
52 })
53else
54 console.log('no invite')
55

Built with git-ssb-web