Example of generating icon bundles

This tutorial is a part of Iconify icon bundles tutorial.

Below are several examples of scripts that generate icon bundles. You can use code from these examples to create your own bundle script.

All examples assume you either:

  • Understand basic JavaScript, have Node.js installed on your computer and you know how to use it.
  • Know PHP and have it installed on your computer.

Preferred method is JavaScript. If you are creating web pages, you are working with JavaScript anyway, so why not use it to build stuff?

SVG Framework only examples

Examples for creating bundles for SVG Framework.

Examples using Iconify JSON Tools for PHP and Iconify Utils for Node.js. These examples use IconifyJSON icon sets as source:

Examples using Iconify Tools for Node.js. These examples import SVG files:

All icon components

Examples for creating bundles for various Iconify icon components (React, Vue, Svelte).

Difference from examples above is, bundles generated by these examples starts with an import statement and it must be bundled with your code.

Examples using Iconify JSON Tools for PHP and Iconify Utils for Node.js. These examples use IconifyJSON icon sets as source:

Examples using Iconify Tools for Node.js. These examples import SVG files: