Files: c395c89410dba096bd2c95c1b7aa0e70c2b6ccc8 / index.js
679 bytesRaw
1 | var h = require('hyperscript') |
2 | var u = require('./util') |
3 | var pull = require('pull-stream') |
4 | var combine = require('depject') |
5 | var fs = require('fs') |
6 | var path = require('path') |
7 | var SbotApi = require('./sbot-api') |
8 | |
9 | document.head.appendChild(h('style', fs.readFileSync('./style.css', 'utf8'))) |
10 | |
11 | var modules = fs.readdirSync(path.join(__dirname, 'modules')) |
12 | .map(function (e) { return require('./modules/'+e) }) |
13 | |
14 | var renderers = [] |
15 | var app = [] |
16 | |
17 | |
18 | var u = require('./util') |
19 | |
20 | require('ssb-client')(function (err, sbot) { |
21 | if(err) throw err |
22 | |
23 | modules.unshift(SbotApi(sbot)) |
24 | modules.unshift({app: app}) |
25 | combine(modules) |
26 | |
27 | document.body.appendChild(u.decorate(app, sbot)) |
28 | }) |
29 | |
30 | |
31 | |
32 | |
33 | |
34 | |
35 |
Built with git-ssb-web