Commit ca77c54d481c41a3dbb9f2c43454de9dd9dde4c1
Merge branch 'master' of github.com:ssbc/scuttle-poll
Piet Geursen committed on 6/6/2018, 4:19:08 AMParent: 3ab10d83371e7fb6a97e4b0a23ded460ab8e01de
Parent: c46ad9c39623cd98b6cbb308d0c0870f15ff701c
Files changed
NOTES.md | changed |
methods.js | changed |
package-lock.json | changed |
package.json | changed |
NOTES.md | ||
---|---|---|
@@ -18,11 +18,23 @@ | ||
18 | 18 … | |
19 | 19 … | - Vertical slice |
20 | 20 … | - Design for front end dev |
21 | 21 … | - Decorate |
22 … | + - could be painful to maintain / needs a clear spec | |
22 | 23 … | - Opinionated folder structure. Human readable API. |
23 | 24 … | - Testing |
24 | 25 … | - Linting with ale |
25 | 26 … | - Give your test files `*.test.js` filenames. It helps with readability when there are errors. |
26 | 27 … | - the inject pattern |
27 | 28 … | - prefer passing a single object rather than ordered args |
28 | 29 … | - don't modify data passed into a function |
30 … | +- Observables: | |
31 … | + - making everying obs takes A LOT of time | |
32 … | + - could just make async cb, then have a pull stream which announces updates. On update, re-run async cb, or whatever | |
33 … | + - could write an async cb which takes a `refresh` function which gets run when there's a change. | |
34 … | + - not everything really needs live updates | |
35 … | + - not that important: | |
36 … | + - body / title / choices (none of these can change) | |
37 … | + - important: | |
38 … | + - new positions / results | |
39 … | + - closesAt | |
40 … | + - when I post a new position (should update view) |
methods.js | ||
---|---|---|
@@ -3,11 +3,16 @@ | ||
3 | 3 … | |
4 | 4 … | module.exports = { |
5 | 5 … | poll: { |
6 | 6 … | async: { |
7 … | + get: require('./poll/async/get'), | |
7 | 8 … | publishChooseOne: require('./poll/async/publishChooseOne'), |
8 | - get: require('./poll/async/get') | |
9 … | + publishUpdatedClosingTime: require('./poll/async/publishUpdatedClosingTime') | |
9 | 10 … | }, |
11 … | + // NOTE - we think this is a bad idea, planning to deprecate | |
12 … | + // obs: { | |
13 … | + // get: require('./poll/obs/get') | |
14 … | + // }, | |
10 | 15 … | sync: { |
11 | 16 … | isPoll: () => isPoll, |
12 | 17 … | isChooseOnePoll: () => isChooseOnePoll |
13 | 18 … | // Poll: // this is not exported - doesn't follow the inject pattern atm |
package-lock.json | ||
---|---|---|
The diff is too large to show. Use a local git client to view these changes. Old file size: 194817 bytes New file size: 194817 bytes |
Built with git-ssb-web