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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@epiled/icon-font-builder

v1.3.2

Published

Generate icon fonts from SVG files

Readme

Icon Font Builder

Generate icon fonts from SVG files and automatically create CSS classes.

Table of Contents

Features

  • Generate icon fonts from SVG files
  • Automatic CSS class generation
  • CLI and Node API support
  • Customizable output structure
  • Automatic icons preview page

Install

npm install @epiled/icon-font-builder

CLI

npx @epiled/icon-font-builder

Node API

import { buildIcons } from "@epiled/icon-font-builder";

await buildIcons();

Usage

After building the icons, include the generated CSS in your project:

<link rel="stylesheet" href="css/icons.css" />

Then use the icons with CSS classes:

<i class="icon-add-user"></i>
<i class="icon-arrow"></i>

Example Project Structure:

src/
├── icons/
|  ├── add-user.svg
|  └── arrow.svg

Examples

Gulp

Example using Gulp task runner.

Minimal configuration

import gulp from "gulp";
import { buildIcons } from "@epiled/icon-font-builder";

gulp.task("buildIcons", async function () {
  await buildIcons();
});
Output Tree:
dist/
├── css/
|  └── icons.css
├── fonts/
|  └── Icons/
|     ├── Icons.svg
|     ├── Icons.ttf
|     ├── Icons.woff
|     └── Icons.woff2
└── icons-preview.html
Output CSS:
@font-face {
  font-family: "Icons";
  src:
    url("../fonts/Icons/Icons.woff2") format("woff2"),
    url("../fonts/Icons/Icons.woff") format("woff"),
    url("../fonts/Icons/Icons.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

[class^="icon-"],
[class*=" icon-"] {
  font-family: "Icons" !important;
  speak: none;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.icon-add-user::before {
  content: "\e001";
}

.icon-arrow::before {
  content: "\e002";
}

Recommended configuration

import gulp from "gulp";
import { buildIcons } from "@epiled/icon-font-builder";

gulp.task("buildIcons", async function () {
  await buildIcons({iconsName: "Epl-Icons"});
});
Output Tree:
dist/
├── Epl-Icons/
│   └── Epl-Icons/
│       ├── Epl-Icons.svg
│       ├── Epl-Icons.ttf
│       ├── Epl-Icons.woff
│       └── Epl-Icons.woff2
├── css/
│   └── epl-icons.css
└── icons-preview.html
Output CSS:
@font-face {
  font-family: "Epl-Icons";
  src:
    url("../Epl-Icons/Epl-Icons/Epl-Icons.woff2")
      format("woff2"),
    url("../Epl-Icons/Epl-Icons/Epl-Icons.woff")
      format("woff"),
    url("../Epl-Icons/Epl-Icons/Epl-Icons.ttf")
      format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

[class^="icon-"],
[class*=" icon-"] {
  font-family: "Epl-Icons" !important;
  speak: none;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.icon-add-user::before {
  content: "\e001";
}

.icon-arrow::before {
  content: "\e002";
}

Full configuration

import gulp from "gulp";
import { buildIcons } from "@epiled/icon-font-builder";

gulp.task("buildIcons", async function () {
  await buildIcons({
    iconsName: "Icons-All", // required
    inputDir: "src/icons",
    outputDir: `dist/Icons-Output`,
    font: {
      fontName: "Icons-Font-Name",
      folderName: "Icons-Folder-Name",
      fontFileName: "Icons-Font-File-Name",
      fontPath: "../Icons-Font-Path",
    },
    css: {
      cssClass: "icon-all",
      cssFileName: "icons-css-file-name",
    },
    templates: {
      styles: {
        generation: true,
        outputDir: "dist",
      },
      preview: {
        generation: true,
        outputDir: "dist",
      },
    }
    stripPrefix: "icon-", // removes "icon-" prefix from icon filenames
    codepointsFile: ".icon-builder-cache",
  });
});
Output Tree:
dist/
├── Icons-Output/
│   └── Icons-Folder-Name/
│       ├── Icons-Font-File-Name.svg
│       ├── Icons-Font-File-Name.ttf
│       ├── Icons-Font-File-Name.woff
│       └── Icons-Font-File-Name.woff2
├── css/
│   └── icons-css-file-name.css
└── icons-preview.html
Output CSS:
@font-face {
  font-family: "Icons-All";
  src:
    url("../Icons-Font-Path/Icons-Folder-Name/Icons-Font-File-Name.woff2")
      format("woff2"),
    url("../Icons-Font-Path/Icons-Folder-Name/Icons-Font-File-Name.woff")
      format("woff"),
    url("../Icons-Font-Path/Icons-Folder-Name/Icons-Font-File-Name.ttf")
      format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

[class^="icon-all-"],
[class*=" icon-all-"] {
  font-family: "Icons-All" !important;
  speak: none;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.icon-all-add-user::before {
  content: "\e001";
}

.icon-all-arrow::before {
  content: "\e002";
}

Options

| Option | Type | Default | Description | | ------------------------------- | ------------------- | ------------------- | ------------------------------------------------------------ | | iconsName | string | Icons | Name of the icon set | | inputDir | string | src/icons | Source folder for SVG icons | | outputDir | string | dist/fonts | Output directory | | font.fontName | string | Icons | Font name | | font.folderName | string | Icons | Folder name for font files | | font.fontFileName | string | Icons | Font file base name | | font.fontPath | string | ../fonts | Path to font in generated styles | | css.cssClass | string | icon | CSS class prefix | | css.cssFileName | string | icons | Name of generated CSS/SASS file (without extension) | | templates.styles.generation | boolean | true | Enable or disable generation of style files (CSS/SASS) | | templates.styles.outputDir | string | dist | Directory where generated style files will be written | | templates.preview.generation | boolean | true | Enable or disable generation of the preview file (HTML demo) | | templates.preview.outputDir | string | dist | Directory where the preview file will be written | | formats | ("css" | "sass")[] | ["css"] | Style formats to generate when styles template is enabled | | stripPrefix | string | null | null | Remove a prefix from icon names | | codepointsFile | string | .icon-builder-cache | File path to store persistent icon codepoints |

Requirements

  • Node.js >= 22

Author

License

MIT