git ssb

7+

dinoworm ๐Ÿ› / patchcore



Tree: 34a54c295b6a1f27085cf860c739fb389ea68211

Files: 34a54c295b6a1f27085cf860c739fb389ea68211 / example / index.js

805 bytesRaw
1const combine = require('depject')
2const apply = require('depject/apply')
3const h = require('mutant/h')
4const fs = require('fs')
5const Path = require('path')
6
7const modules = require('../')
8var api = entry(combine(modules))
9
10// TODO depject.entry(sockets, {
11// render_feed: 'first',
12// feeds: {
13// public: 'first'
14// }
15// })()
16
17require('insert-css')(fs.readFileSync(Path.join(__dirname, 'styles.css'), 'utf8'))
18
19var app = h('div.App', [
20 api.feed.html.render(api.feed.pull.public)
21])
22
23document.head.appendChild(h('title', 'PATCHCORE :: Example'))
24document.body.appendChild(app)
25
26function entry (sockets) {
27 return {
28 feed: {
29 html: {
30 render: apply.first(sockets.feed.html.render)
31 },
32 pull: {
33 public: apply.first(sockets.feed.pull.public)
34 }
35 }
36 }
37}
38

Built with git-ssb-web