Commit e518e86306d43d22a854ec083b38b201f413e4b6
separate electron and browser instructions
Don Smith authored on 2/5/2017, 11:18:40 PMmix irving committed on 2/7/2017, 10:57:01 PM
Parent: 4c22eacd412c2a6a7649e81d7a725b89f12c34bc
Files changed
README.md | changed |
package.json | changed |
README.md | |||
---|---|---|---|
@@ -1,22 +1,18 @@ | |||
1 | 1 … | # patchbay | |
2 | 2 … | ||
3 | 3 … | Prototype of a pluggable patchwork. | |
4 | 4 … | ||
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). | ||
7 | 6 … | ||
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! | ||
12 | 8 … | ||
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. | ||
15 | 10 … | ||
16 | -## Running | ||
17 | 11 … | ||
18 | -``` | ||
12 … | +## Setup | ||
13 … | + | ||
14 … | +```sh | ||
19 | 15 … | npm install scuttlebot@latest -g | |
20 | 16 … | # make sure you have secure-scuttlebutt@15.2.0 | |
21 | 17 … | npm ls secure-scuttlebutt -g | |
22 | 18 … | sbot server | |
@@ -29,60 +25,59 @@ | |||
29 | 25 … | sbot plugins.install ssb-ws | |
30 | 26 … | sbot plugins.install ssb-fulltext # for faster searches (optional) | |
31 | 27 … | # restart sbot server (go back to previous tab and kill it) | |
32 | 28 … | ``` | |
33 | -now clone and run patchbay. | ||
34 | -``` | ||
29 … | + | ||
30 … | +now clone patchbay. | ||
31 … | + | ||
32 … | +```sh | ||
35 | 33 … | git clone https://github.com/ssbc/patchbay.git | |
36 | 34 … | cd patchbay | |
37 | 35 … | npm install | |
36 … | +``` | ||
37 … | + | ||
38 … | + | ||
39 … | +## Running the desktop app | ||
40 … | + | ||
41 … | +From inside the patchbay repo folder, | ||
42 … | + | ||
43 … | +```sh | ||
38 | 44 … | npm run rebuild | |
39 | -npm run bundle | ||
40 | 45 … | npm start | |
41 | 46 … | ``` | |
42 | 47 … | ||
43 | -## Lite | ||
44 | 48 … | ||
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 | ||
48 | 50 … | ||
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 | ||
50 | 55 … | sbot invite.create --modern | |
51 | 56 … | ``` | |
52 | 57 … | ||
53 | -Also set up sbot to allow these connections with: | ||
58 … | +From inside the patchbay repo folder, run `npm run lite`. | ||
54 | 59 … | ||
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 | ||
60 | 61 … | created above using: index.html#ws://localhost:8989.... | |
61 | 62 … | ||
62 | -## how to add a feature | ||
63 | 63 … | ||
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 | ||
67 | 65 … | ||
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). | ||
70 | 67 … | ||
71 | -see the code for more examples. | ||
68 … | +To add a new detail, that appears above a message, export a function named `message_meta`. | ||
72 | 69 … | ||
73 | -## module graph | ||
70 … | +See the code for more examples. | ||
74 | 71 … | ||
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) | ||
78 | 72 … | ||
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 … | + | ||
79 | 77 … | [module graph](./graph.svg) | |
80 | 78 … | ||
79 … | + | ||
81 | 80 … | ## License | |
82 | 81 … | ||
83 | 82 … | MIT | |
84 | 83 … | ||
85 | - | ||
86 | - | ||
87 | - | ||
88 | - |
package.json | ||
---|---|---|
@@ -9,9 +9,8 @@ | ||
9 | 9 … | }, |
10 | 10 … | "scripts": { |
11 | 11 … | "lite": "mkdir -p build && browserify index.js | indexhtmlify --title patchbay > build/index.html", |
12 | 12 … | "start": "electro index.js", |
13 | - "bundle": "mkdir -p build && browselectrify index.js > build/bundle.js", | |
14 | 13 … | "rebuild": "npm rebuild --runtime=electron --target=$(electron -v) --abi=$(electron --abi) --disturl=https://atom.io/download/atom-shell", |
15 | 14 … | "graph": "node index.js | dot -Tsvg > graph.svg", |
16 | 15 … | "test": "browserify modules_*/index.test.js | tape-run" |
17 | 16 … | }, |
Built with git-ssb-web