Skip to content

feat: add install command as second row on each plugin card#3

Merged
tomdavidson merged 4 commits into
mainfrom
feat/install-cmd-card
May 11, 2026
Merged

feat: add install command as second row on each plugin card#3
tomdavidson merged 4 commits into
mainfrom
feat/install-cmd-card

Conversation

@tomdavidson

Copy link
Copy Markdown
Owner

Summary

Adds proto install --pin -c local <id> latest as a second copyable command row beneath the existing proto plugin add row on every plugin card.

Changes

scripts/build-jsonld.ts

  • Added installCommand to the Plugin type
  • Populated it in toPlugin: proto install --pin -c local ${id} latest
  • Included it in toPluginEntry so it is emitted into plugins.jsonld

web/index.html

  • Refactored makeCopyButton to accept cmd and ariaLabel directly (decoupled from plugin object)
  • Extracted makeCmdRow(cmd, ariaLabel) — shared row builder used by both commands
  • Renamed old makeCmdRowmakeAddRow(plugin) — wraps makeCmdRow for the add command
  • Added makeInstallRow(plugin) — wraps makeCmdRow for the install command
  • Added .cmd-rows wrapper (flex-direction: column; gap: 0.375rem) to group the two rows
  • Updated buildCard to render both rows inside .cmd-rows

Result per card

proto plugin add jsonschema "https://tomdavidson.github.io/proto/jsonschema.toml"  [copy]
proto install --pin -c local jsonschema latest                                      [copy]

- build-jsonld.ts: add installCommand to Plugin type, toPlugin, and toPluginEntry
- web/index.html: rename makeCmdRow→makeAddRow, add makeInstallRow, update buildCard
@tomdavidson tomdavidson merged commit 21ba951 into main May 11, 2026
1 check passed
@tomdavidson tomdavidson deleted the feat/install-cmd-card branch May 11, 2026 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant