Add icon generation script from Google Material Icons rounded variant #2

Merged
Copilot merged 3 commits from copilot/create-node-script-for-icons into main 2026-03-12 15:48:17 +00:00
Copilot commented 2026-03-12 14:36:10 +00:00 (Migrated from github.com)

Several icons contained incorrect SVG path data. There was no automated way to regenerate them from the official source.

Changes

script/generate-icons.mjs

New Node.js script that regenerates all icon TypeScript files from the @material-icons/svg package's round variant:

  • Reads icon→category mapping from data.json
  • For each category, reads svg/{icon}/round.svg and emits a typed generate_function export
  • Rewrites src/index.ts to export all generated categories
// Usage
node script/generate-icons.mjs

Icon files (src/material/)

All 18 existing category files regenerated with correct rounded SVG data. Two new categories added:

  • material-math.ts — 12 icons
  • material-shopping.ts — 2 icons (barcode, qrcode)

src/index.ts

Updated to export the two new categories.

package.json

Added @material-icons/svg@1.0.33 as a devDependency (build-time only, no runtime impact).


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Several icons contained incorrect SVG path data. There was no automated way to regenerate them from the official source. ## Changes ### `script/generate-icons.mjs` New Node.js script that regenerates all icon TypeScript files from the `@material-icons/svg` package's `round` variant: - Reads icon→category mapping from `data.json` - For each category, reads `svg/{icon}/round.svg` and emits a typed `generate_function` export - Rewrites `src/index.ts` to export all generated categories ```js // Usage node script/generate-icons.mjs ``` ### Icon files (`src/material/`) All 18 existing category files regenerated with correct rounded SVG data. Two new categories added: - `material-math.ts` — 12 icons - `material-shopping.ts` — 2 icons (barcode, qrcode) ### `src/index.ts` Updated to export the two new categories. ### `package.json` Added `@material-icons/svg@1.0.33` as a devDependency (build-time only, no runtime impact). <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs.
Sign in to join this conversation.
No description provided.