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