Commit 9a90757d9b3b08602cfc1aaf8d1b507d15a23d94
simplify index.js
Dominic Tarr committed on 7/22/2016, 3:51:01 AMParent: ae5dc8ad4e093e668b8fcff19e4434330f5d9d24
Files changed
index.js | changed |
index.js | ||
---|---|---|
@@ -7,40 +7,13 @@ | ||
7 | 7 | var SbotApi = require('./sbot-api') |
8 | 8 | |
9 | 9 | var modules = require('./modules') |
10 | 10 | |
11 | -var renderers = [] | |
12 | -var app = [] | |
13 | -//var App = require('./plugs').first(app) | |
14 | - | |
15 | 11 | var u = require('./util') |
16 | 12 | |
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 | 13 | modules['sbot-api.js'] = SbotApi() |
14 | +combine(modules) | |
38 | 15 | |
39 | -modules['tabs.js'] | |
40 | - | |
41 | -combine(modules) //, ['app', 'sbot'].concat(indexes) ) | |
42 | - | |
43 | 16 | if(process.title === 'node') { |
44 | 17 | console.log(require('depject/graph')(modules)) |
45 | 18 | process.exit(0) |
46 | 19 | } |
@@ -48,7 +21,14 @@ | ||
48 | 21 | document.head.appendChild( |
49 | 22 | h('style', fs.readFileSync('./style.css', 'utf8') |
50 | 23 | )) |
51 | 24 | |
52 | -console.log(modules['app.js']) | |
53 | -document.body.appendChild(h('div.screen.column', modules['app.js'].app[0]())) | |
25 | +document.body.appendChild(modules['app.js'].app()) | |
54 | 26 | |
27 | + | |
28 | + | |
29 | + | |
30 | + | |
31 | + | |
32 | + | |
33 | + | |
34 | + |
Built with git-ssb-web