# icomoon-build

> Build IcoMoon project in Node

Latest version **0.2.8** (published 2016-09-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install icomoon-build
pnpm add icomoon-build
yarn add icomoon-build
bun add icomoon-build
```

Provides the command `icomoon-build`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.8 |
| Published | 2016-09-13 |
| First published | 2014-01-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 27 |
| Author | Joe Hu |
| Maintainers | sapikachu |
| Keywords | icomoon, icon, cli, scss, less |

## Links

- npm: https://www.npmjs.com/package/icomoon-build
- Repository: https://github.com/SAPikachu/icomoon-build
- Homepage: https://github.com/SAPikachu/icomoon-build#readme
- Issues: https://github.com/SAPikachu/icomoon-build/issues
- npm.io page: https://npm.io/package/icomoon-build

## Dependencies (3)

- [adm-zip](https://npm.io/package/adm-zip.md) ~0.4.3
- [optimist](https://npm.io/package/optimist.md) ~0.6.0
- [phantomjs-prebuilt](https://npm.io/package/phantomjs-prebuilt.md) ^2.1.7

## Alternatives

- [@fortawesome/react-fontawesome](https://npm.io/package/@fortawesome/react-fontawesome.md) — 2.2M weekly downloads
- [roboto-fontface](https://npm.io/package/roboto-fontface.md) — 196.0K weekly downloads
- [@react-native-vector-icons/common](https://npm.io/package/@react-native-vector-icons/common.md) — 150.4K weekly downloads
- [@procore/core-icons](https://npm.io/package/@procore/core-icons.md) — 4.6K weekly downloads
- [@react-md/material-icons](https://npm.io/package/@react-md/material-icons.md) — 1.6K weekly downloads

## Recent versions

- 0.2.8 (latest) — 2016-09-13
- 0.2.7 — 2016-09-03
- 0.2.6 — 2016-08-26
- 0.2.5 — 2016-08-24
- 0.2.4 — 2015-08-09
- 0.2.3 — 2014-12-07
- 0.2.2 — 2014-12-05
- 0.2.1 — 2014-12-04
- 0.2.0 — 2014-10-22
- 0.1.2 — 2014-10-21
- 0.1.1 — 2014-09-13
- 0.1.0 — 2014-03-28
- 0.0.3 — 2014-03-13
- 0.0.2 — 2014-01-06
- 0.0.1 — 2014-01-03

## README

icomoon-build
=============

Build IcoMoon project in Node.

Why this?
---------

We use IcoMoon with customized SCSS stylesheets in our project, it's annoying to copy new icon declarations from IcoMoon-generated stylesheet to our SCSS stylesheet every time I need to add new icons. So I created this package to make the process a little easier.

Installation
------------

Simply install using [npm](http://npmjs.org):

    npm install icomoon-build

Usage
-----

First, create a project on [IcoMoon](http://icomoon.io/app/), and save the project file locally (Menu -> Manage Projects -> Download).

Then run the script like this:

    node_modules/.bin/icomoon-build -p path/to/your/project.json --scss path/to/output.scss --fonts path/to/fonts/
    
    # Or if icomoon-build is installed globally:
    icomoon-build -p path/to/your/project.json --scss path/to/output.scss --fonts path/to/fonts/

As of version 0.1.0, LESS stylesheet can also be generated. Simply change `--scss` to `--less` to specify LESS output.
    
Note
----

SCSS/LESS output is supposed to be imported to another SCSS/LESS file, it only contains individual icon definitions. Here is an example of generated SCSS file:

    // Script-generated file, do not modify by hand
    
    $icon-export-content: "\e600";
    
    @mixin icon-classes {
        .icon-export:before { content: $icon-export-content; }
    }

You can use the file like this:

    @font-face {
        font-family: "icons";
        src: url("../fonts/icons.eot");
        src: url("../fonts/icons.eot?#iefix") format("embedded-opentype"),
        	 url("../fonts/icons.woff") format("woff"),
        	 url("../fonts/icons.ttf") format("truetype"),
        	 url("../fonts/icons.svg#icons") format("svg");
        font-weight: normal;
        font-style: normal;
    }
    
    .icon:before {
        display: inline-block;
        position: relative;
        font-family: "icons";
        font-style: normal;
        font-weight: normal;
        speak: none;
        text-decoration: inherit;
        line-height: 99%;
        text-align: center;
        vertical-align: baseline;
        
        // better font rendering
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    @import "path/to/generated.scss";
    
    @include icon-classes;

Change log
----------

### 0.2.8

* Missing one place in last change, oops.

### 0.2.7

* Support multiple class names. Thanks @Shoplifter for reporting this.

### 0.2.6

* 0.2.5 was actually broken by updated phantomjs, Fixed.

### 0.2.5

* Upgrade phantomjs to fix https://nodesecurity.io/advisories/130

### 0.2.4

* Fix for latest IcoMoon app

### 0.2.3

* Forgot to prepend library path when reading presets.json
* Fix `QUOTA_EXCEEDED_ERR`

### 0.2.2

* Fix script error on page.

### 0.2.1

* Works again for latest IcoMoon website. Fix #6

### 0.2.0

* Support item map output for SCSS (--scss-with-map option). Implement #5
* Add callback argument to lib/cli.js. (Idea stolen from @nanymor)

### 0.1.2

* IcoMoon no longer supports SSLv3, specify --ssl-protocol=any to let PhantomJS choose newer version. Fix #4

### 0.1.1

* Relax stdout buffer limit. Fix #3. (reported by @yairEO, thanks!)

### 0.1.0

* Support LESS output

### 0.0.3

* Disable disk cache as it breaks after server code is updated

### 0.0.2

* Fix freezing in some cases

### 0.0.1

* Initial release

---
_Source: https://npm.io/package/icomoon-build · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
