# icomoon-generator

> This is the best icomoon tool that you can ever seen

Latest version **1.6.0** (published 2021-07-18) · ISC license · 0 weekly downloads

## Install

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

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.6.0 |
| Published | 2021-07-18 |
| First published | 2021-07-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 6 |
| Unpacked size | 102.3 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| Author | mucahidyazar |
| Maintainers | mucahidyazar |

## Links

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

## Dependencies (6)

- [yargs](https://npm.io/package/yargs.md) ^17.0.1
- [fs-extra](https://npm.io/package/fs-extra.md) ^10.0.0
- [puppeteer](https://npm.io/package/puppeteer.md) 10.1.0
- [extract-zip](https://npm.io/package/extract-zip.md) ^2.0.1
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.12.0
- [@babel/plugin-transform-runtime](https://npm.io/package/@babel/plugin-transform-runtime.md) ^7.14.5

## Recent versions

- 1.6.0 (latest) — 2021-07-18

## README

# icomoon-generator

icomoon-generator is a cross platform tool which create a new icomoon set.

Since icomoon do not provide any public API to use, you may found it's hard to integrate icomoon into your current workflow. icomoon-generator was made to solve this.

## dependencies

icomoon-generator will use your local Chrome to interact with icomoon in headless mode, so you need to make sure the latest version Chrome browser was installed.

Another dependency is the LTS version Node.js and all of those were isntalled as latest versions so we don't have any bulneralibity.

## usage

If you like to integrate icomoon-generator into your workflow, it's recommended to use in the programmatic way.
You need a folder that you keep your svg files inside of it and you need to keep its name like me on svgDir. And you can choose the output folder of generated files.

```js
// Install:
npm install --save-dev icomoon-generator
or
yarn add -D icomoon-generator

// Usage
const pipeline = require("icomoon-generator");

pipeline({
  // If you add a selectionPath file you will add the svg icons over the existing one,
  // But if you dont add a selectionPath icomoon-generator will use an empty selection.json file and will generate a new selection.json back to square one and will prepare just for the svg icons that are inside the svg folder
  selectionPath: 'icons/selection.json',
  outputDir: "icons",
  svgDir: "svg",
  forceOverride: true,
  // visible: true,
  whenFinished(result) {
    // you can get the absolute path of output directory via result.outputDir
  },
});
```

You can hack the downloaded icomoon files in a callback property `whenFinished`, or just use `Promise` to control your code since pipeline will return a promise.

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