You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: document code-classroom fork and upstream sync
Document code-classroom-base on MIT release tags, code-classroom integration,
compare link for RPF-only diffs, editor-ui as primary consumer, GitHub
Packages publishing, local dev, and refreshing the base branch from MIT
releases.
Co-authored-by: Cursor <cursoragent@cursor.com>
Copy file name to clipboardExpand all lines: README.md
+61Lines changed: 61 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,67 @@ Scratch project by pressing "Create" on that website or by visiting <https://scr
6
6
This is a source code repository for the packages that make up the Scratch editor and a few additional support
7
7
packages. Use this if you'd like to learn about how the Scratch editor works or to contribute to its development.
8
8
9
+
## Raspberry Pi Foundation fork (`code-classroom`)
10
+
11
+
This repository is a public fork of [scratchfoundation/scratch-editor](https://github.com/scratchfoundation/scratch-editor), maintained for Code Classroom and related products. Modified source is published under AGPL-3.0; published npm packages should correspond to a specific commit on this repository.
12
+
13
+
**Primary consumer:** this build is maintained for use with [editor-ui](https://github.com/RaspberryPiFoundation/editor-ui), which depends on `@RaspberryPiFoundation/scratch-gui` published from this repository.
14
+
15
+
### Upstream anchor and integration branch
16
+
17
+
|||
18
+
|---|---|
19
+
|**Upstream anchor branch**|[`code-classroom-base`](https://github.com/RaspberryPiFoundation/scratch-editor/tree/code-classroom-base) — points at a [scratchfoundation/scratch-editor](https://github.com/scratchfoundation/scratch-editor)**release tag** only (no RPF packaging) |
20
+
|**Upstream release**|[`v13.7.3`](https://github.com/scratchfoundation/scratch-editor/releases/tag/v13.7.3) (current tag on `code-classroom-base`) |
21
+
|**Integration branch**|[`code-classroom`](https://github.com/RaspberryPiFoundation/scratch-editor/tree/code-classroom) — long-lived branch; RPF packaging, CI, and feature work merge here via PR |
22
+
|**RPF changes (diff)**|[Compare `code-classroom` to `code-classroom-base`](https://github.com/RaspberryPiFoundation/scratch-editor/compare/code-classroom-base...code-classroom) — packaging, CI, and fork-only code |
23
+
|**Published package**|[`@RaspberryPiFoundation/scratch-gui`](https://github.com/RaspberryPiFoundation/scratch-editor/pkgs/npm/scratch-gui) on GitHub Packages |
24
+
25
+
`code-classroom` is based on the latest upstream **release tag** on `code-classroom-base`, plus RPF-specific packaging and CI.
26
+
27
+
### Keeping `code-classroom` up to date with MIT
28
+
29
+
We track [scratchfoundation/scratch-editor](https://github.com/scratchfoundation/scratch-editor)**release tags** (not `develop`). Pick the latest release from [GitHub Releases](https://github.com/scratchfoundation/scratch-editor/releases) when refreshing the fork.
30
+
31
+
**`code-classroom-base`** holds the pure upstream snapshot. **`code-classroom`** holds RPF changes on top — see the [branch comparison](https://github.com/RaspberryPiFoundation/scratch-editor/compare/code-classroom-base...code-classroom) (or locally: `git diff code-classroom-base..code-classroom`). To adopt a newer MIT release, update `code-classroom-base` to the new tag, then integrate that bump into `code-classroom` via PR.
32
+
33
+
#### Refresh `code-classroom-base` to a newer release tag
34
+
35
+
Use the tag from [scratchfoundation/scratch-editor releases](https://github.com/scratchfoundation/scratch-editor/releases) (example: `v13.7.4-svg`):
Use the Node version in [`.nvmrc`](.nvmrc). Install dependencies from the **repository root**:
47
+
48
+
```bash
49
+
nvm install
50
+
nvm use
51
+
NODE_ENV=development npm ci
52
+
npm run build
53
+
```
54
+
55
+
Root [`.npmrc`](.npmrc) routes the `@RaspberryPiFoundation` scope to GitHub Packages. This requires a Github access token with `read:packages` and `repo`.
56
+
57
+
```bash
58
+
cd packages/scratch-gui
59
+
npm run test:lint
60
+
npm run test:unit
61
+
npm start # http://localhost:8601/
62
+
```
63
+
64
+
### CI and publishing
65
+
66
+
-**Pull requests:** CI runs build and tests; **no** package is published to GitHub Packages.
67
+
-**Push to `code-classroom`:** CI builds and publishes `@RaspberryPiFoundation/scratch-gui` with a version such as `13.7.3-code-classroom.YYYYMMDDHHMMSS`. Pin an explicit version in consumers (e.g. editor-ui); do not rely on floating `latest` in production.
68
+
- Publishing is configured in [`.github/workflows/ci.yml`](.github/workflows/ci.yml) (inline publish step on the `code-classroom` branch only). Upstream’s npmjs release workflow (`.github/workflows/publish.yml`) is disabled on this fork.
69
+
9
70
## What's in this repository?
10
71
11
72
The `packages` directory in this repository contains:
0 commit comments