Z User commited on
Commit
cbd4423
·
1 Parent(s): 2d39154

dssl-vscode 0.7.1 registry-ready: lowercase publisher, icon, PUBLISHING.md, vsix in repo files; editor chapter updated

Browse files
README.md CHANGED
@@ -68,7 +68,7 @@ Both drop a `dssl-engine/` folder next to you: the engine, a starter token set,
68
 
69
  Prefer to click: [dssl-engine.zip](https://dssl-sable.vercel.app/dssl-engine.zip) or [dssl-engine.tar.gz](https://dssl-sable.vercel.app/dssl-engine.tar.gz). Same package, straight from the browser.
70
 
71
- Writing your own .dssl? The official editor extension puts the real compiler in your editor: the squiggles are the same errors the browser console prints, completions come from your own token registry, and hovers explain the semantic vocabulary. One package for VS Code and VSCodium (same extension API): grab `dssl-vscode/dssl-vscode-0.7.1.vsix` from the repo source, or build it with `npx @vscode/vsce package` inside `dssl-vscode/`, then Extensions panel -> ... -> Install from VSIX.
72
 
73
  AI agents and machine reviewers: this repo ships `llms.txt` (dense, structured facts), `AGENTS.md` (how to work on the codebase) and `PARITY.md` (the honest feature matrix against CSS). The site serves the same `llms.txt` at https://dssl-sable.vercel.app/llms.txt
74
 
 
68
 
69
  Prefer to click: [dssl-engine.zip](https://dssl-sable.vercel.app/dssl-engine.zip) or [dssl-engine.tar.gz](https://dssl-sable.vercel.app/dssl-engine.tar.gz). Same package, straight from the browser.
70
 
71
+ Writing your own .dssl? The official editor extension (`ehs-studio.dssl-vscode`) puts the real compiler in your editor: the squiggles are the same errors the browser console prints, completions come from your own token registry, and hovers explain the semantic vocabulary. One package for VS Code and VSCodium (same extension API): download `dssl-vscode/dssl-vscode-0.7.1.vsix` from the repo files, then Extensions panel -> ... -> Install from VSIX. An Open VSX listing (so it appears in VSCodium's Extensions tab, searchable) is staged and publishes with one Open VSX token; see `dssl-vscode/PUBLISHING.md`.
72
 
73
  AI agents and machine reviewers: this repo ships `llms.txt` (dense, structured facts), `AGENTS.md` (how to work on the codebase) and `PARITY.md` (the honest feature matrix against CSS). The site serves the same `llms.txt` at https://dssl-sable.vercel.app/llms.txt
74
 
dssl-vscode/PUBLISHING.md ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Publishing DSSL Language Support
2
+
3
+ The extension is a normal, registry-ready package: publisher `ehs-studio`, id
4
+ `ehs-studio.dssl-vscode`, repository field, icon, LICENSE, README all set. What
5
+ follows is exactly what it takes to put it in each registry.
6
+
7
+ ## Open VSX (this is the one for VSCodium)
8
+
9
+ VSCodium's Extensions tab searches **open-vsx.org** by default. Once published
10
+ there, "DSSL" shows up in the tab, searchable, one-click install, updates included.
11
+
12
+ One-time, on your side (about 2 minutes):
13
+
14
+ 1. Go to https://open-vsx.org and sign in with your GitHub account.
15
+ 2. Top right: your avatar → **Settings** → **Access Tokens** → **Generate token**.
16
+ 3. Give it any name, copy the value, and paste it in chat. It gets stored the
17
+ same way as the HF and Vercel tokens (chmod 600, outside every tracked file,
18
+ mirrored into `.git/backups/`).
19
+
20
+ Then it is one command on my side:
21
+
22
+ ```sh
23
+ bash scripts/publish-openvsx.sh
24
+ ```
25
+
26
+ The script reads the token, creates the `ehs-studio` namespace (tolerates "already
27
+ exists"), and publishes the newest `.vsix`. After that:
28
+
29
+ - VSCodium: Extensions tab → search "DSSL" → Install.
30
+ - Future updates: bump `version` in `dssl-vscode/package.json`, repackage with
31
+ `npx @vscode/vsce package --no-dependencies`, rerun the script.
32
+
33
+ ## Microsoft Marketplace (for VS Code proper, optional, more hoops)
34
+
35
+ VS Code proper searches the Microsoft Marketplace. Same package, different
36
+ gatekeeper: it requires an Azure DevOps organization and a personal access token.
37
+
38
+ 1. Create an organization at https://dev.azure.com (free).
39
+ 2. Go to https://marketplace.visualstudio.com/manage and create a publisher.
40
+ Suggested ID: `ehs-studio`.
41
+ 3. In Azure DevOps: User settings → **Personal access tokens** → New token with
42
+ scope **Marketplace → Manage**.
43
+ 4. Hand over the token like the others, then it is:
44
+
45
+ ```sh
46
+ cd dssl-vscode && npx @vscode/vsce publish --pat <token>
47
+ ```
48
+
49
+ This can happen at any time; Open VSX first does not block it.
50
+
51
+ ## Local install (works today, no accounts, no waiting)
52
+
53
+ - VSCodium / VS Code: Extensions panel → **⋯** → *Install from VSIX* → pick the
54
+ `.vsix`. Dragging the `.vsix` onto the Extensions panel works too.
55
+ - The latest build always lives in `download/` and in the HF repo tree.
56
+
57
+ ## Before every publish
58
+
59
+ - `node scripts/sync-extension-engine.mjs` after ANY engine change, so the
60
+ bundled compiler matches the browser compiler.
61
+ - Run the extension lib tests (36 assertions) before packaging.
dssl-vscode/README.md CHANGED
@@ -7,6 +7,11 @@ the same errors the browser console prints, did-you-mean included.
7
  Works in **VS Code** and **VSCodium** (same extension API; install the `.vsix` in either
8
  via Extensions panel → ⋯ → *Install from VSIX*).
9
 
 
 
 
 
 
10
  ## Features
11
 
12
  - **Real-compiler diagnostics.** Errors AND warnings (the v0.7 warnings channel included:
 
7
  Works in **VS Code** and **VSCodium** (same extension API; install the `.vsix` in either
8
  via Extensions panel → ⋯ → *Install from VSIX*).
9
 
10
+ Extension id: **`ehs-studio.dssl-vscode`**. An Open VSX listing (the registry VSCodium's
11
+ Extensions tab searches) is staged: one Open VSX token from the user and
12
+ `scripts/publish-openvsx.sh` puts it in the tab, searchable. See PUBLISHING.md for both
13
+ that flow and the Microsoft Marketplace flow.
14
+
15
  ## Features
16
 
17
  - **Real-compiler diagnostics.** Errors AND warnings (the v0.7 warnings channel included:
dssl-vscode/dssl-vscode-0.7.1.vsix ADDED
Binary file (46.2 kB). View file
 
dssl-vscode/icon.png ADDED
dssl-vscode/package.json CHANGED
@@ -3,7 +3,8 @@
3
  "displayName": "DSSL Language Support",
4
  "description": "The DSSL style language in your editor: syntax highlighting, real-compiler diagnostics (the same errors the browser console shows), completions from the live token registry, hover docs. Works in VS Code and VSCodium.",
5
  "version": "0.7.1",
6
- "publisher": "EHS-Studio",
 
7
  "license": "MIT",
8
  "engines": {
9
  "vscode": "^1.82.0"
 
3
  "displayName": "DSSL Language Support",
4
  "description": "The DSSL style language in your editor: syntax highlighting, real-compiler diagnostics (the same errors the browser console shows), completions from the live token registry, hover docs. Works in VS Code and VSCodium.",
5
  "version": "0.7.1",
6
+ "publisher": "ehs-studio",
7
+ "icon": "icon.png",
8
  "license": "MIT",
9
  "engines": {
10
  "vscode": "^1.82.0"
scripts/make-extension-icon.py ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Generates the DSSL extension marketplace icon (128x128 PNG).
3
+
4
+ Design ties into the site's classic re-skin: ink background, parchment
5
+ section-mark glyph (the site's logo mark is a literal section sign), brass accent.
6
+ """
7
+ from PIL import Image, ImageDraw, ImageFont
8
+
9
+ SIZE = 128
10
+ INK = (24, 19, 16, 255) # candlelit walnut, the site's dark bg
11
+ PARCHMENT = (245, 240, 228, 255) # site parchment
12
+ BRASS = (201, 164, 92, 255) # brass accent
13
+
14
+ img = Image.new("RGBA", (SIZE, SIZE), (0, 0, 0, 0))
15
+ d = ImageDraw.Draw(img)
16
+ d.rounded_rectangle([2, 2, SIZE - 2, SIZE - 2], radius=24, fill=INK)
17
+
18
+ font_path = "/usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf"
19
+ try:
20
+ font = ImageFont.truetype(font_path, 78)
21
+ except OSError:
22
+ font = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf", 78)
23
+
24
+ glyph = "\u00a7" # section sign, the site's logo mark
25
+ bbox = d.textbbox((0, 0), glyph, font=font)
26
+ w = bbox[2] - bbox[0]
27
+ h = bbox[3] - bbox[1]
28
+ x = (SIZE - w) / 2 - bbox[0]
29
+ y = (SIZE - h) / 2 - bbox[1] - 6
30
+ d.text((x, y), glyph, font=font, fill=PARCHMENT)
31
+
32
+ # brass baseline accent under the glyph
33
+ d.rounded_rectangle([36, SIZE - 26, SIZE - 36, SIZE - 20], radius=3, fill=BRASS)
34
+
35
+ out = "/home/z/my-project/dssl-vscode/icon.png"
36
+ img.save(out, "PNG")
37
+ print("wrote", out, img.size)
scripts/publish-openvsx.sh ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ # Publishes the DSSL extension to Open VSX (the registry VSCodium searches).
3
+ #
4
+ # Token resolution order: $1 | $OPENVSX_TOKEN | /home/z/.openvsx_token
5
+ # The token is never echoed and never lands in a tracked file.
6
+ set -uo pipefail
7
+
8
+ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/dssl-vscode"
9
+
10
+ TOKEN="${OPENVSX_TOKEN:-}"
11
+ if [ -z "$TOKEN" ] && [ -f /home/z/.openvsx_token ]; then
12
+ TOKEN="$(tr -d '[:space:]' < /home/z/.openvsx_token)"
13
+ fi
14
+ if [ $# -ge 1 ] && [ -n "$1" ]; then
15
+ TOKEN="$(printf '%s' "$1" | tr -d '[:space:]')"
16
+ fi
17
+ if [ -z "$TOKEN" ]; then
18
+ echo "error: no Open VSX token (pass as arg 1, set OPENVSX_TOKEN, or write /home/z/.openvsx_token)" >&2
19
+ exit 1
20
+ fi
21
+ if [ ${#TOKEN} -lt 16 ]; then
22
+ echo "error: token looks too short to be real" >&2
23
+ exit 1
24
+ fi
25
+
26
+ VSIX="$(ls -t "$DIR"/dssl-vscode-*.vsix 2>/dev/null | head -1)"
27
+ if [ -z "$VSIX" ]; then
28
+ echo "error: no .vsix found in $DIR (run: cd dssl-vscode && npx @vscode/vsce package --no-dependencies)" >&2
29
+ exit 1
30
+ fi
31
+
32
+ echo "publishing $(basename "$VSIX") to Open VSX (namespace ehs-studio)..."
33
+ cd "$DIR"
34
+
35
+ # create-namespace fails if it already exists; that is fine, keep going
36
+ npx --yes ovsx create-namespace ehs-studio --pat "$TOKEN" \
37
+ || echo "(namespace create reported an error, continuing: it probably already exists)"
38
+
39
+ npx --yes ovsx publish "$(basename "$VSIX")" --pat "$TOKEN"
40
+ rc=$?
41
+
42
+ if [ $rc -eq 0 ]; then
43
+ name="$(python3 -c "import json;print(json.load(open('package.json'))['name'])")"
44
+ ver="$(python3 -c "import json;print(json.load(open('package.json'))['version'])")"
45
+ echo ""
46
+ echo "LIVE: https://open-vsx.org/extension/ehs-studio/$name/$ver"
47
+ echo "VSCodium: Extensions tab -> search DSSL -> Install"
48
+ fi
49
+
50
+ unset TOKEN
51
+ exit $rc