Files: ca718f616a051e93adeb22faa3fc06646f667973 / browser.js
626 bytesRaw
1 | const css = require('sheetify') |
2 | const { start, html, pull } = require('inu') |
3 | const log = require('inu-log') |
4 | |
5 | const config = require('./config') |
6 | const App = require('./app') |
7 | |
8 | css` |
9 | html, body, .main, .graph { |
10 | width: 100%; |
11 | height: 100%; |
12 | position: absolute; |
13 | overflow: hidden; |
14 | padding: 0; |
15 | margin: 0; |
16 | } |
17 | ` |
18 | |
19 | var app = App(config) |
20 | if (process.env.NODE_ENV !== 'production') { |
21 | app = log(app) |
22 | } |
23 | const { views, models } = start(app) |
24 | const main = document.createElement('div') |
25 | main.className = 'main' |
26 | document.body.appendChild(main) |
27 | |
28 | pull( |
29 | views(), |
30 | pull.drain(view => { |
31 | html.update(main, view) |
32 | }) |
33 | ) |
34 |
Built with git-ssb-web