Cog Yang
Cog Yin
Image 0
Image 1
Project Favicon

Favicons Tool

0

A CLI app that generates and arranges the favicons of Zimo Web in SVG using theme configs.

Zimo
Jun 3, 2024

Zimo Web Favicons Tool

Zimo Web Favicons Tool is a command-line interface (CLI) tool designed to generate and arrange favicons for Zimo Web based on theme configurations. It supports the creation of individual favicon SVGs and the arrangement of multiple favicons into a grid layout. By reusing the code from Zimo Web that renders favicons from theme config files, this tool enhances favicon design visualization. Initially implemented with Bun, the tool was later switched to Node.js for better compatibility with npm.

Installation

You can install the tool globally using npm:

npm install -g zimo-web-favicons

Usage

zimo-web-favicons <command> [options]

Commands

  • generate Generate a single favicon.
  • arrange Arrange multiple favicons into a grid.

Options

  • -o, --output <outputPath> Specify the output path. Defaults to generated_image or arranged_image.
  • -p, --png Generate PNG instead of SVG. Defaults to false.
  • -s, --scale <number> Scale factor for the PNG output.
  • -b, --background <hex> Background color in hex format.
  • -h, --help Show help information.
  • -v, --version Show the current version.

Examples

  • Generate a Single Favicon
zimo-web-favicons generate input.json -o output.svg
  • Arrange Multiple Favicons into a Grid
zimo-web-favicons arrange input1.json input2.json input3.json -o output.svg
  • Generate PNG Output with Scale and Background Color
zimo-web-favicons arrange input1.json input2.json -o output.png -p -s 2 -b #ff00ff88