Icon Cli

Install the util:

Flags:

  • Source dir: --src| -s
  • Destination dir: --dest| -d
  • Extension: default(dist.js)

package.json config:

Icons must be monochromatic and their filenames dash-cased. Flattening SVGs before usage is recommended.

Formating svg files(dash-cased.svg):

  • viewbox: 0 0 24 24
  • role: img
  • aria-label: iconname icon
<svg role="img" aria-label="check icon" viewBox="0 0 24 24">
  <path d="M9.59 14.58l-3.17-3.17L5 12.82l4.59 4.59 10-10L18.18 6" />
</svg>

Import your custom icons: