feat(ext): generate extension icons from a single SVG source#45
Merged
Conversation
Both shells shipped with the default puzzle-piece icon. Add a single master artwork (assets/gitmarks.svg, cyan/magenta per spec) and a build-time rasterizer (scripts/gen-icons.mjs, @resvg/resvg-js) that emits 16/32/48/128 px PNGs into each shell's git-ignored icons/ dir. - Chrome: crxjs emits icons/ into dist/ from the manifest refs. - Firefox: plain Vite (root: src) can't see icons/, so copy-manifest.mjs copies the PNGs into dist/icons/ post-build. - Both manifests declare icons + action.default_icon. - prebuild/predev/pree2e run gen-icons.mjs before the existing copy-html. - READMEs document the single-source workflow; drop stale "puzzle piece" notes. Chrome README also documents loading the same dist/ in other Chromium browsers (Brave/Edge/Opera/Vivaldi). - .gitignore: ignore generated icons/ per shell; ignore .claude/ + .sid/. Verified: gen-icons.mjs runs clean; both shells build with icons present in dist/manifest.json and dist/icons/. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
paperhurts
added a commit
that referenced
this pull request
Jun 13, 2026
feat(ext): generate extension icons from a single SVG source
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Both browser shells shipped with the default puzzle-piece icon. This adds real branding driven from a single source of truth.
assets/gitmarks.svg— master artwork (cyan/magenta perspec.md),512×512viewBox.scripts/gen-icons.mjs— rasterizes the SVG to 16/32/48/128 px PNGs into each shell'sicons/dir using@resvg/resvg-js(prebuilt binary, no system ImageMagick/librsvg).icons/dirs are git-ignored and recreated on every build.Wiring
icons+action.default_icon.prebuild/predev/pree2erungen-icons.mjsbefore the existingcopy-html.mjs.@crxjs/vite-pluginemitsicons/intodist/from the manifest refs.root: src) can't seeicons/, socopy-manifest.mjscopies the PNGs intodist/icons/post-build.Docs
dist/in other Chromium browsers (Brave/Edge/Opera/Vivaldi)..gitignore: ignore generatedicons/per shell; ignore.claude/+.sid/.Verification
node scripts/gen-icons.mjs→ clean, writes 8 PNGs.pnpm --filter @gitmarks/extension-chrome build→ icons present indist/manifest.json+dist/icons/.pnpm --filter @gitmarks/extension-firefox build→[firefox] copied icons/ to dist/,dist/icons/populated.🤖 Generated with Claude Code