npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@quartzds/icon-generator

v10.2.4

Published

Quartz design system icon generator

Readme


SPDX-FileCopyrightText: © 2024 Schneider Electric

SPDX-License-Identifier: Apache-2.0

@quartzds/icon-generator

NPM Package CI Status REUSE status License

Icon library generator for the Quartz design system.

💿 Installation

npm install --save-dev @quartzds/icon-generator

📖 Usage

The qds-icon-generator reads library YAML metadata and source SVG files to generate the following assets:

  • processed library metadata in icons.json
  • optimized SVG files including copyright and license headers
  • icon fonts with a codepoints JSON file and a CSS file for HTML consumption

Run qds-icon-generator alone to display the list of supported commands and options.

⚙️ Commands summary

  • generate-metadata: read library metadata a YAML file, process it (see below) and output the result to a JSON file
  • check-consistency: check that SVG files in input folder match the list of icons defined in the library metadata YAML file
  • generate-svg: generate optimized SVG files from input files, including copyright and license from library metadata
  • generate-font: generate icon font files from the SVG files

📚 Library metadata

The library metadata is a YAML file primarily organizing icons in a hierarchy:

Library > Categories > Groups > Icons

It also stores important information like copyright, license, guidelines, generation options, etc.

Note that custom data in the YAML file is preserved in the output JSON file.

Basic structure

Metadata types are described in the src/metadata/types.ts file. Here's a minimal example:

name: Icon library name
brand: Brand name
copyright: © <YEAR> Company name # Library copyright
license: LicenseRef-Proprietary # Library license (SPDX identifier)

categories:
  - name: Category name
    description: Category description

    groups:
      - name: Group name
        description: Group description
        icons:
          - name: Icon name
            tags: [list, of, tags, or, aliases]

Cascading metadata

On top of the basic structure, extended data can be defined at any level of the hierarchy, defined by the CascadingMetadata type.

Metadata will cascade to the descendants of the node on which they're defined. Descendants can also specify the same metadata again, which will override values inherited from their parent.

There's an exception, though. The guidelines will concatenate instead of overriding.

Here's the list of the cascading metadata:

| Name | Type | Redefinition behavior | Description | | -------------- | ------------------ | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | | copyright | string | Override inherited ancestor value | Copyright statement | | license | string | Override inherited ancestor value | SPDX license identifier | | preserveColors | boolean | Override inherited ancestor value | Keep colors specified in the source SVG files. false by default, which means colors are removed from the source SVG. | | guidelines | string | string[] | Concatenate with ancestor values | Single guideline, or list of guidelines. |

Additional processing logic

In addition to the cascading feature, the following processing is run:

  • Groups are sorted alphabetically within their Category
  • Icons are sorted alphabetically within their Group

Note that the top-level list of categories is not sorted alphabetically.

🔧 Alternate configuration

@quartzds/icon-generator uses SVGO and Fantasticon to generate icons. SVGO's configuration file, as well as Fantasticon's configuration file, are both supported by @quartzds/icon-generator.

⚖️ License

See the LICENSE file for license rights and limitations.