git ssb

16+

Dominic / patchbay



Commit 4cc0d31d81a81e1f7fa95ad23f2a988b0c941e6d

linting !

mix irving committed on 2/26/2017, 2:05:45 AM
Parent: 0a1c7842563bee8ca52221c858cfe7309da160da

Files changed

.gitignorechanged
junk/next-stepper.jschanged
main/html/scroller.jschanged
message/html/compose.jschanged
message/html/layout/default.jschanged
package.jsonchanged
router/html/page/private.jschanged
router/html/page/public.jschanged
.gitignoreView
@@ -1,1 +1,2 @@
11 node_modules
2+npm-debug.log
junk/next-stepper.jsView
@@ -55,5 +55,4 @@
5555 for (var k in obj) _obj[k] = obj[k]
5656 return _obj
5757 }
5858
59-
main/html/scroller.jsView
@@ -3,11 +3,11 @@
33
44 exports.gives = nest('main.html.scroller')
55
66 exports.create = function (api) {
7- return nest('main.html.scroller', build_scroller)
7+ return nest('main.html.scroller', Scroller)
88
9- function build_scroller ({ prepend = [], append = [] } = {}) {
9+ function Scroller ({ prepend = [], append = [] } = {}) {
1010 const content = h('section.content')
1111
1212 const container = h('Scroller', { style: { overflow: 'auto' } }, [
1313 h('div.wrapper', [
message/html/compose.jsView
@@ -18,9 +18,9 @@
1818 exports.gives = nest('message.html.compose')
1919
2020 exports.create = function (api) {
2121 return nest('message.html.compose', compose)
22-
22+
2323 function compose ({ shrink = true, meta, prepublish, placeholder = 'Write a message' }, cb) {
2424 var files = []
2525 var filesById = {}
2626 var focused = Value(false)
message/html/layout/default.jsView
@@ -14,11 +14,11 @@
1414
1515 exports.gives = nest('message.html.layout')
1616
1717 exports.create = (api) => {
18- return nest('message.html.layout', message_layout)
18+ return nest('message.html.layout', messageLayout)
1919
20- function message_layout (msg, opts) {
20+ function messageLayout (msg, opts) {
2121 if (!(opts.layout === undefined || opts.layout === 'default')) return
2222
2323 return h('Message', [
2424 h('section.avatar', {}, api.about.html.image(msg.value.author)),
package.jsonView
@@ -3,11 +3,11 @@
33 "version": "0.0.1",
44 "description": "patchbay 2? building on patchcore",
55 "main": "index.js",
66 "scripts": {
7+ "lint": "standard",
78 "rebuild": "npm rebuild --runtime=electron --target=$(electron -v) --abi=$(electron --abi) --disturl=https://atom.io/download/atom-shell",
8- "start": "electro index.js",
9- "test": "echo \"Error: no test specified\" && exit 1"
9+ "start": "electro index.js"
1010 },
1111 "repository": {
1212 "type": "git",
1313 "url": "git+https://github.com/ssbc/picknmix.git"
@@ -40,6 +40,9 @@
4040 "setimmediate": "^1.0.5",
4141 "ssb-mentions": "^0.1.1",
4242 "suggest-box": "^2.2.3",
4343 "xtend": "^4.0.1"
44+ },
45+ "devDependencies": {
46+ "standard": "^8.6.0"
4447 }
4548 }
router/html/page/private.jsView
@@ -1,5 +1,4 @@
1-const { h } = require('mutant')
21 const nest = require('depnest')
32 const pull = require('pull-stream')
43 const Scroller = require('pull-scroll')
54 const next = require('../../../junk/next-stepper')
@@ -12,25 +11,25 @@
1211 'keys.sync.id': 'first',
1312 'main.html.scroller': 'first',
1413 'message.html': {
1514 compose: 'first',
16- render: 'first',
17- },
15+ render: 'first'
16+ }
1817 })
1918
2019 exports.create = function (api) {
2120 return nest('router.html.page', privatePage)
22-
21+
2322 function privatePage (path) {
2423 if (path !== '/private') return
2524
2625 const id = api.keys.sync.id()
2726
2827 const composer = api.message.html.compose({
29- meta: { type: 'post' },
28+ meta: { type: 'post' },
3029 prepublish: meta => {
3130 meta.recps = [id, ...meta.mentions]
32- .filter(m => ref.isFeed(typeof m === 'string' ? m : m.link))
31+ .filter(m => ref.isFeed(typeof m === 'string' ? m : m.link))
3332 return meta
3433 },
3534 placeholder: 'Write a private message. \n\n@mention users in the first message to start a private thread.'}
3635 )
router/html/page/public.jsView
@@ -1,5 +1,4 @@
1-const { h } = require('mutant')
21 const nest = require('depnest')
32 const pull = require('pull-stream')
43 const Scroller = require('pull-scroll')
54 const next = require('../../../junk/next-stepper')
@@ -9,20 +8,23 @@
98 exports.needs = nest({
109 'feed.pull.public': 'first',
1110 'message.html': {
1211 compose: 'first',
13- render: 'first',
12+ render: 'first'
1413 },
1514 'main.html.scroller': 'first'
1615 })
1716
1817 exports.create = function (api) {
1918 return nest('router.html.page', publicPage)
20-
19+
2120 function publicPage (path) {
2221 if (path !== '/public') return
2322
24- const composer = api.message.html.compose({ meta: { type: 'post' }, placeholder: 'Write a public message'})
23+ const composer = api.message.html.compose({
24+ meta: { type: 'post' },
25+ placeholder: 'Write a public message'
26+ })
2527 const { container, content } = api.main.html.scroller({ prepend: composer })
2628
2729 pull(
2830 next(api.feed.pull.public, {old: false, limit: 100}),

Built with git-ssb-web