Files: 08e1fc42a3722f8f133fdcb3a7460462d599f889 / index.js
600 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 | |
8 | document.head.appendChild(h('style', fs.readFileSync('./style.css', 'utf8'))) |
9 | |
10 | var modules = fs.readdirSync(path.join(__dirname, 'modules')) |
11 | .map(function (e) { return require('./modules/'+e) }) |
12 | |
13 | var renderers = [] |
14 | var app = [] |
15 | modules.unshift({app: app}) |
16 | |
17 | combine(modules) |
18 | |
19 | var u = require('./util') |
20 | |
21 | require('ssb-client')(function (err, sbot) { |
22 | if(err) throw err |
23 | document.body.appendChild(u.decorate(app, sbot)) |
24 | }) |
25 | |
26 | |
27 |
Built with git-ssb-web