Files: e8b919558c93da12334cc6e605de9d1828ddb297 / browser.js
618 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 } = 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