Skip to content

feat: support PNG source input in addition to SVG - #3

Merged
ralyodio merged 1 commit into
masterfrom
worktree-png-input-support
Aug 17, 2026
Merged

feat: support PNG source input in addition to SVG#3
ralyodio merged 1 commit into
masterfrom
worktree-png-input-support

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

Switching to PNG logo art required the generator to accept raster sources.

  • Add inputPath as the canonical source option; svgPath keeps working as an alias and may itself point at a .png
  • Accept .svg and .png, rejecting other formats with a clearer error
  • Only write favicon.svg for SVG sources; a PNG source yields favicon.png and favicon.ico
  • Link /favicon.png instead of /favicon.svg in meta-tags.html for PNG sources
  • Warn when a PNG source is smaller than the largest icon (upscaling) or is not square (padding)
  • Expose isPngFile, isSupportedInputFile, getInputFormat, resolveInputPath, SUPPORTED_INPUT_EXTENSIONS, DEFAULT_INPUT_CANDIDATES
  • Interactive CLI detects favicon.svg / favicon.png / logo.png as its default
  • Report inputPath and inputFormat on the result object
  • Add PNG fixtures (512x512, 64x64, 300x150) and 30 new tests
  • Bump to 1.2.0 and update README/CHANGELOG

Switching to PNG logo art required the generator to accept raster sources.

- Add `inputPath` as the canonical source option; `svgPath` keeps working as
  an alias and may itself point at a .png
- Accept .svg and .png, rejecting other formats with a clearer error
- Only write favicon.svg for SVG sources; a PNG source yields favicon.png
  and favicon.ico
- Link /favicon.png instead of /favicon.svg in meta-tags.html for PNG sources
- Warn when a PNG source is smaller than the largest icon (upscaling) or is
  not square (padding)
- Expose isPngFile, isSupportedInputFile, getInputFormat, resolveInputPath,
  SUPPORTED_INPUT_EXTENSIONS, DEFAULT_INPUT_CANDIDATES
- Interactive CLI detects favicon.svg / favicon.png / logo.png as its default
- Report inputPath and inputFormat on the result object
- Add PNG fixtures (512x512, 64x64, 300x150) and 30 new tests
- Bump to 1.2.0 and update README/CHANGELOG

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ralyodio
ralyodio merged commit b1cc0f9 into master Aug 17, 2026
3 checks passed
@ralyodio
ralyodio deleted the worktree-png-input-support branch August 17, 2026 10:18
@github-actions

Copy link
Copy Markdown

ThreatCrush Security Scan

1 finding(s)

MEDIUM: 1

Severity Rule Location
MEDIUM manifest-install-lifecycle-script package.json:23

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio ralyodio mentioned this pull request Aug 17, 2026
ralyodio added a commit that referenced this pull request Aug 17, 2026
1.2.0 was published and then unpublished, so npm permanently blocks
republishing that version number. Bump to 1.2.1 so the PNG source
input support from #3 can actually ship to the registry.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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