git ssb

16+

Dominic / patchbay



Commit e518e86306d43d22a854ec083b38b201f413e4b6

separate electron and browser instructions

Don Smith authored on 2/5/2017, 11:18:40 PM
mix irving committed on 2/7/2017, 10:57:01 PM
Parent: 4c22eacd412c2a6a7649e81d7a725b89f12c34bc

Files changed

README.mdchanged
package.jsonchanged
README.mdView
@@ -1,22 +1,18 @@
11 # patchbay
22
33 Prototype of a pluggable patchwork.
44
5-`patchbay` is an secure-scuttlebutt client interface
6-that is fully compatible with [patchwork](https://github.com/ssbc/patchwork)
5 +`patchbay` is a secure-scuttlebutt client interface that is fully compatible with [patchwork](https://github.com/ssbc/patchwork).
76
8-I started `patchbay` to experiment with a different internal architecture
9-based on [depject](https://github.com/dominictarr/depject). The goal was
10-to make it easier to develop new features, and enable or disable features.
11-This has so far been quite successful!
7 +I started `patchbay` to experiment with a different internal architecture based on [depject](https://github.com/dominictarr/depject). The goal was to make it easier to develop new features, and enable or disable features. This has so far been quite successful!
128
13-This makes in very easy to create say, a renderer for a new message type,
14-or switch to a different method for choosing user names.
9 +This makes in very easy to create say, a renderer for a new message type, or switch to a different method for choosing user names.
1510
16-## Running
1711
18-```
12 +## Setup
13 +
14 +```sh
1915 npm install scuttlebot@latest -g
2016 # make sure you have secure-scuttlebutt@15.2.0
2117 npm ls secure-scuttlebutt -g
2218 sbot server
@@ -29,60 +25,59 @@
2925 sbot plugins.install ssb-ws
3026 sbot plugins.install ssb-fulltext # for faster searches (optional)
3127 # restart sbot server (go back to previous tab and kill it)
3228 ```
33-now clone and run patchbay.
34-```
29 +
30 +now clone patchbay.
31 +
32 +```sh
3533 git clone https://github.com/ssbc/patchbay.git
3634 cd patchbay
3735 npm install
36 +```
37 +
38 +
39 +## Running the desktop app
40 +
41 +From inside the patchbay repo folder,
42 +
43 +```sh
3844 npm run rebuild
39-npm run bundle
4045 npm start
4146 ```
4247
43-## Lite
4448
45-To run a lite client in the browser instead of using electron, use npm
46-run lite from the prompt instead of run bundle. After that you need to
47-generate a modern invite:
49 +## Running in the browser
4850
49-```
51 +Make sure scuttlebot is allowing private connections. Stop any running sbot server, restart it with the `--allowPrivate` option and create a new modern invite:
52 +
53 +```sh
54 +sbot server --allowPrivate
5055 sbot invite.create --modern
5156 ```
5257
53-Also set up sbot to allow these connections with:
58 +From inside the patchbay repo folder, run `npm run lite`.
5459
55-```
56-sbot server --allowPrivate
57-```
58-
59-Lastly open build/index.html in a browser and append the invite
60 +Lastly open `build/index.html` in a browser and append the invite
6061 created above using: index.html#ws://localhost:8989....
6162
62-## how to add a feature
6363
64-To add a new message type, add add a js to `./modules/` that
65-exports a function named `message_content` (it should return an html element)
66-To add a new tab, export a function named `screen_view` (returns an html element)
64 +## How to add a feature
6765
68-To add a new detail, that appears above a message,
69-export a function named `message_meta`.
66 +To add a new message type, add add a js to `./modules/` that exports a function named `message_content` (it should return an HTML element). To add a new tab, export a function named `screen_view` (returns an html element).
7067
71-see the code for more examples.
68 +To add a new detail, that appears above a message, export a function named `message_meta`.
7269
73-## module graph
70 +See the code for more examples.
7471
75-patchbay uses [depject](http://github.com/dominictarr/depject) to manage it's modules.
76-here is a graph of the current connections between them. (round shows module,
77-square shows api, arrow direction points from user to provider)
7872
73 +## Module graph
74 +
75 +patchbay uses [depject](http://github.com/dominictarr/depject) to manage it's modules. Here is a graph of the current connections between them (round shows module, square shows api, arrow direction points from user to provider).
76 +
7977 [module graph](./graph.svg)
8078
79 +
8180 ## License
8281
8382 MIT
8483
85-
86-
87-
88-
package.jsonView
@@ -9,9 +9,8 @@
99 },
1010 "scripts": {
1111 "lite": "mkdir -p build && browserify index.js | indexhtmlify --title patchbay > build/index.html",
1212 "start": "electro index.js",
13- "bundle": "mkdir -p build && browselectrify index.js > build/bundle.js",
1413 "rebuild": "npm rebuild --runtime=electron --target=$(electron -v) --abi=$(electron --abi) --disturl=https://atom.io/download/atom-shell",
1514 "graph": "node index.js | dot -Tsvg > graph.svg",
1615 "test": "browserify modules_*/index.test.js | tape-run"
1716 },

Built with git-ssb-web