Icon magic CLI package.
Last updated 7 months ago by omayeli .
BSD-2-Clause · Original npm · Tarball · package.json
$ cnpm install @icon-magic/cli 
SYNC missed versions from official npm registry.


Icon Magic command line.


Using npm:

npm install --save-dev @icon-magic/cli

or using yarn:

yarn add @icon-magic/cli --dev


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

  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.

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


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.


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.


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.


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.

Current Tags

  • 2.2.4-beta.0                                ...           beta (3 months ago)
  • 2.2.2-beta.0                                ...           latest (7 months ago)

11 Versions

  • 2.2.4-beta.0                                ...           3 months ago
  • 2.2.3-beta.0                                ...           6 months ago
  • 2.2.2-beta.0                                ...           7 months ago
  • 2.2.1-beta.0                                ...           7 months ago
  • 2.2.0-beta.0                                ...           8 months ago
  • 2.1.3-beta.0                                ...           9 months ago
  • 2.1.1-beta.0                                ...           9 months ago
  • 2.1.0-beta.0                                ...           9 months ago
  • 2.0.3-beta.0                                ...           9 months ago
  • 2.0.2-beta.0                                ...           9 months ago
  • 2.0.1-beta.0                                ...           10 months ago
Today 0
This Week 11
This Month 11
Last Day 11
Last Week 0
Last Month 1
Dependencies (6)
Dev Dependencies (0)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |