Files: e273010065ffea194bcb8199f124bd13fa441c47 / index.js
823 bytesRaw
1 | var h = require('hyperscript') |
2 | |
3 | window.addEventListener('error', function onError(e) { |
4 | document.body.appendChild(h('div.error', |
5 | h('h1', e.message), |
6 | h('big', h('code', e.filename + ':' + e.lineno)), |
7 | h('pre', e.error ? (e.error.stack || e.error.toString()) : e.toString()))) |
8 | }) |
9 | |
10 | var u = require('./util') |
11 | var pull = require('pull-stream') |
12 | var combine = require('depject') |
13 | var fs = require('fs') |
14 | var path = require('path') |
15 | var SbotApi = require('./sbot-api') |
16 | |
17 | var modules = require('./modules') |
18 | |
19 | var u = require('./util') |
20 | |
21 | modules['sbot-api.js'] = SbotApi() |
22 | combine(modules) |
23 | |
24 | if(process.title === 'node') { |
25 | console.log(require('depject/graph')(modules)) |
26 | process.exit(0) |
27 | } |
28 | |
29 | document.head.appendChild( |
30 | h('style', fs.readFileSync('./style.css', 'utf8') |
31 | )) |
32 | |
33 | document.body.appendChild(modules['app.js'].app()) |
34 | |
35 |
Built with git-ssb-web