git ssb

16+

Dominic / patchbay



Tree: 1d9d3847f73308f375aa4bf88926240ec24d4266

Files: 1d9d3847f73308f375aa4bf88926240ec24d4266 / index.js

1469 bytesRaw
1var h = require('hyperscript')
2
3window.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
10var u = require('./util')
11var pull = require('pull-stream')
12var combine = require('depject')
13var fs = require('fs')
14var path = require('path')
15var SbotApi = require('./sbot-api')
16
17var modules = require('./modules')
18
19var renderers = []
20var app = []
21//var App = require('./plugs').first(app)
22
23var u = require('./util')
24
25//modules.unshift(SbotApi())
26//modules.unshift({app: app})
27
28//var indexes = fs.readdirSync(path.join(__dirname, 'modules'))
29//var i = indexes.indexOf('index.js')
30//indexes.splice(i, 1)
31
32//var sv = [], screen_view = require('./plugs').first(sv)
33//modules['main.js' ] = {
34// screen_view: sv,
35// app: function () {
36// return h('div.row',
37// screen_view('/public'),
38// screen_view('/private')
39// )
40// }
41//}
42
43modules['app.js'] = {app: []}
44
45modules['sbot-api.js'] = SbotApi()
46
47modules['tabs.js']
48
49combine(modules) //, ['app', 'sbot'].concat(indexes) )
50
51if(process.title === 'node') {
52 console.log(require('depject/graph')(modules))
53 process.exit(0)
54}
55
56document.head.appendChild(
57 h('style', fs.readFileSync('./style.css', 'utf8')
58))
59
60console.log(modules['app.js'])
61document.body.appendChild(h('div.screen.column', modules['app.js'].app[0]()))
62
63

Built with git-ssb-web