hopple 0.1.0-rc.1 → 0.1.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -5
- package/hopple.js +76 -42
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,6 +9,7 @@ The command-line tool for game developers:
|
|
|
9
9
|
uploads it to a Hopple server.
|
|
10
10
|
- `hopple list`, `login`, `logout` and `whoami` manage what you've published
|
|
11
11
|
and who you publish as.
|
|
12
|
+
- `hopple collaborators` chooses who else may publish a game.
|
|
12
13
|
|
|
13
14
|
It is a dev dependency of the game (`npm install --save-dev hopple`, which
|
|
14
15
|
`hopple create` sets up), run with `npx hopple`. It is one compiled file with
|
|
@@ -19,7 +20,7 @@ whatever tool the game uses.
|
|
|
19
20
|
|
|
20
21
|
## The project's config
|
|
21
22
|
|
|
22
|
-
`dev`, `check` and `
|
|
23
|
+
`dev`, `check`, `publish` and `collaborators` work on a **project**: a directory with a hopple
|
|
23
24
|
config in it. They find it in the current directory, or the nearest one above
|
|
24
25
|
it (like `tsconfig.json`). The config says everything they need to know:
|
|
25
26
|
|
|
@@ -71,6 +72,7 @@ hopple dev [project] [--port <n>] [--no-build]
|
|
|
71
72
|
hopple check [project] [--no-build]
|
|
72
73
|
hopple publish [project] [--server <url>] [--no-build]
|
|
73
74
|
hopple list [--server <url>]
|
|
75
|
+
hopple collaborators [add <handle> | remove <handle>] [project] [--server <url>]
|
|
74
76
|
hopple login [--server <url>]
|
|
75
77
|
hopple logout [--server <url>]
|
|
76
78
|
hopple whoami [--server <url>]
|
|
@@ -169,20 +171,28 @@ npx hopple publish path/to/project
|
|
|
169
171
|
1. Makes every check `hopple check` makes, so mistakes are caught before
|
|
170
172
|
anything is uploaded.
|
|
171
173
|
2. Uploads the manifest and the page, and publishes them as
|
|
172
|
-
`<
|
|
174
|
+
`<owner>/<manifest id>`, as a new version. The owner is the manifest's
|
|
175
|
+
`owner`, or you when it names none; only the owner and the game's
|
|
176
|
+
collaborators may publish it. The game is listed with
|
|
173
177
|
the manifest's `title` and `description`: to change them, change the
|
|
174
178
|
manifest.
|
|
175
179
|
3. Prints the version's address, whether it is live, and a link that opens that
|
|
176
180
|
exact version.
|
|
177
181
|
|
|
178
|
-
If you are a trusted user or an admin, the version goes live immediately
|
|
182
|
+
If you are a trusted user or an admin, the version goes live immediately,
|
|
183
|
+
whoever owns the game.
|
|
179
184
|
Otherwise it waits for an admin to review it, and the previous live version
|
|
180
185
|
(if any) stays in the feed meanwhile.
|
|
181
186
|
|
|
187
|
+
Nothing is published for an anonymous account. Without `hopple login`, the
|
|
188
|
+
upload is kept and its link works, but it stays out of the feed, and `publish`
|
|
189
|
+
prints a warning saying so. Sign in before or after: either way the game ends
|
|
190
|
+
up in your account.
|
|
191
|
+
|
|
182
192
|
### `hopple login`, `logout`, `whoami`, `list`
|
|
183
193
|
|
|
184
194
|
- The first command that talks to a server starts an **anonymous session**,
|
|
185
|
-
so you can
|
|
195
|
+
named `anon-` and three words, so you can upload without an account.
|
|
186
196
|
- `hopple login` signs that same session in. It prints a link and a short
|
|
187
197
|
code, and waits: open the link in a browser where you are signed in to the
|
|
188
198
|
site (or sign in there, any way the site offers), check that the page shows
|
|
@@ -191,7 +201,7 @@ Otherwise it waits for an admin to review it, and the previous live version
|
|
|
191
201
|
Anything you published anonymously from this machine moves into your account.
|
|
192
202
|
- `hopple whoami` shows who you are on that server and how you signed in.
|
|
193
203
|
- `hopple logout` ends the session and forgets it.
|
|
194
|
-
- `hopple list` shows each game you
|
|
204
|
+
- `hopple list` shows each game you own or collaborate on, its live version, its
|
|
195
205
|
newest version if different (and whether it is waiting for review), and a
|
|
196
206
|
link to each.
|
|
197
207
|
|
|
@@ -205,6 +215,23 @@ the CLI, under your Hopple player in our usage analytics. Nothing else is
|
|
|
205
215
|
collected, and nothing is collected on your machine. Set `DO_NOT_TRACK=1` to
|
|
206
216
|
leave your publishes and sign-ins out of those counts.
|
|
207
217
|
|
|
218
|
+
### `hopple collaborators`
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
npx hopple collaborators # who else may publish this project's game
|
|
222
|
+
npx hopple collaborators add ada # let ada publish it too
|
|
223
|
+
npx hopple collaborators remove ada
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
A collaborator may publish new versions of the game. Nothing else: deleting
|
|
227
|
+
it and choosing who publishes it stay with its owner. The game is the one
|
|
228
|
+
`publish` would upload to, `<owner>/<manifest id>`. Only accounts can be added,
|
|
229
|
+
and each is told in their inbox.
|
|
230
|
+
|
|
231
|
+
To publish a game you collaborate on, set the manifest's `owner` to the
|
|
232
|
+
owner's handle. Without it, `publish` makes a game of your own instead. Its
|
|
233
|
+
versions go live or wait for review by your own trust, not the owner's.
|
|
234
|
+
|
|
208
235
|
## The dev shell
|
|
209
236
|
|
|
210
237
|
The dev shell runs the game the way real hosts do (same sandbox, same bridge),
|