Files: 1ffe6d6dd1a7a18ae9de5a224286e102f420febe / index.js
898 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 | modules['app.js' ] = {app: app} |
25 | modules['sbot-api.js'] = SbotApi() |
26 | |
27 | combine(modules) //, ['app', 'sbot'].concat(indexes) ) |
28 | |
29 | if(process.title === 'node') { |
30 | console.log(require('depject/graph')(modules)) |
31 | process.exit(0) |
32 | } |
33 | |
34 | document.head.appendChild( |
35 | h('style', fs.readFileSync('./style.css', 'utf8') |
36 | )) |
37 | |
38 | document.body.appendChild(modules['app.js'].app[0]()) |
39 | |
40 |
Built with git-ssb-web