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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@muffin-dev/material-icons-processor

v0.1.3

Published

Small CLI tool for processing several Material Icons images, and export them with specific naming and formats.

Downloads

2

Readme

Muffin Dev - Material Icons Processor

The Material Icons Processor is a small tool for processing and exporting Material Icons as PNG, with specific rules and naming.

By now, the tool is meant to process a given style and size of icon, and export 1x and 2x black and white versions.

The original icons can be found on Google's Material Icons GitHub repository. These icons are already provided in this tool.

How to use?

You can use this package using npx:

npx @muffin-dev/material-icons-processor

This command will run the bin program of the package, which will ask you what to do.

Settings

As the program runs, here are the list of the question you'll have to answer to generate the icons.

  • Output Directory: Absolute or relative path to the directory that will contain the processed icons.
  • Icon Style: Possible answers are filled, outlined, rounded, sharp, twotone, which match with the icon styles you can try on https://fonts.google.com/icons.
  • Icon Size: Possible answers are 18dp, 24dp, 36dp and 48dp.
  • Factor: Select the size factor you want to process, 1x and/or 2x.
  • Icon Color: Select the icon colors you want to process. For now, only black and white available.
  • Filter: Names of the icons you want to process. If not defined, all the icons will be processed.
  • Naming Format: Select a predefined output file name or tell the program you want to create a custom one.
  • Custom Format: If you selected a custom format, just write the expected output file name.

Predefined file naming & custom name symbols

For now, the only predefined file name is unity, which is S_MaterialIcons_%category_%name[-White]{@2x}.

When defining a custom file name format, you can use some symbols that will be replaced with the current processed icons informations:

  • %category: The category name (the parent directory) of the icon, using PascalCase
  • %name: The name of the icon itself, using PascalCase
  • [...]: The content between square brackets is included only when processing the white version of the icon
  • {...}: The content between curly brackets is included only when processing the 2x version of the icon

As an example, the unity naming will produce these results for the new_label icon:

  • S_MaterialIcons_Action_NewLabel
  • S_MaterialIcons_Action_NewLabel@2x
  • S_MaterialIcons_Action_NewLabel-White
  • S_MaterialIcons_Action_NewLabel-White@2x