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

icon-magic

v2.1.0-beta.0

Published

For using the CLI under the `icon-magic` namespace.

Downloads

4

Readme

icon-magic

This package is just a pass through to the Icon Magic CLI

Install

Using npm:

npm install --save-dev icon-magic

or using yarn:

yarn add icon-magic --dev

Usage

Usage:
  icon-magic [command] <directories ...> [options]

Commands:
  build               Construct flavors that an icon from its variants, after applying the build plugins. No options available.
  generate            Generates the flavors of the icon in the extension types that it can be consumed.
  distribute          Moves an icon from the source to the destination, applying plugins if specified.

Options:
  -h, --help              Display usage
  -v, --version           Display version

Commands

If no command is specified after icon-magic, the CLI runs build and generate on the directories specified.

icon-magic .
icon-magic icons/

build and generate automatically write to the out folder in whatever directory they're run in.

Build

icon-magic build .
icon-magic build icons/

Given a set of input directories, finds the closest config file (iconrc.json/iconrc.js/icon) and "builds" the icons from it. Refer to @icon-magic/build for more details.

Generate

icon-magic generate .
icon-magic generate icons/

Given a directory of icons (each icon containing it's own config file consisting of all the flavors from the build step), the generate step is responsible for going through the config file to determine the platforms on which the icon needs to be supported. Refer @icon-magic/generate for more details.

Distribute

Organizes and structures the files from the generate step how they need to be consumed, creates the necessary files for platform consumption and moves the icons from an input folder to the output folder. The input folder for the distribute command should be the output folder of build and generate

The distribute command is the only command for now that requires an output path (as an option -o or --outputPath). As well as the only command with options. Run icon-magic distribute --h for options.

icon-magic distribute inputPath --outputPath

Options: -o, --outputPath Path to the output directory where the generated assets are to be written to -t, --type type of icons format to handle, accepted types are svg|png|webp -g, --groupBy [currently the only supported use is for web sprite creation] if to how to group the icons by category

Refer @icon-magic/distribute for more details.