{"id":13321,"library":"icomoon-build","title":"IcoMoon Build CLI","description":"IcoMoon Build is a command-line interface (CLI) tool designed to automate the generation of SCSS or LESS stylesheets and font files directly from an IcoMoon project file. Its primary purpose is to streamline the workflow for developers who frequently update or add icons, eliminating the need to manually copy icon declarations from IcoMoon's output into their custom stylesheets. The current stable version is 0.2.8, released in August 2016. Due to its specific niche and dependence on the IcoMoon website structure and underlying tools like PhantomJS, its release cadence was historically tied to bug fixes and compatibility updates. It differentiates itself by providing a robust, scriptable solution for integrating custom icon sets into front-end build processes, particularly for projects utilizing Sass or Less.","status":"abandoned","version":"0.2.8","language":"javascript","source_language":"en","source_url":"https://github.com/SAPikachu/icomoon-build","tags":["javascript","icomoon","icon","cli","scss","less"],"install":[{"cmd":"npm install icomoon-build","lang":"bash","label":"npm"},{"cmd":"yarn add icomoon-build","lang":"bash","label":"yarn"},{"cmd":"pnpm add icomoon-build","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core dependency for headless browser automation to interact with the IcoMoon website. This dependency is deprecated and has known security vulnerabilities.","package":"phantomjs","optional":false}],"imports":[{"note":"This package is primarily a command-line interface (CLI) tool. Its functionality is accessed by executing the `icomoon-build` command, typically via `npx` for project-local installations.","wrong":"import { icomoonBuild } from 'icomoon-build';","symbol":"icomoon-build (CLI execution via npx)","correct":"npx icomoon-build -p path/to/project.json --scss path/to/output.scss --fonts path/to/fonts/"},{"note":"Installing globally allows direct execution from the terminal. However, using `npx` with a local installation is generally recommended to ensure project-specific versioning and avoid global package pollution.","symbol":"icomoon-build (CLI execution globally)","correct":"npm install -g icomoon-build\nicomoon-build -p path/to/project.json --scss path/to/output.scss --fonts path/to/fonts/"}],"quickstart":{"code":"npm install icomoon-build\n\n# Example: Process an IcoMoon project and generate files\n# Assuming an IcoMoon project file at 'my-icons/project.json'\n# Output SCSS stylesheet to 'src/styles/icons.scss'\n# Output font files to 'public/fonts/'\n\nnode_modules/.bin/icomoon-build \\\n  -p my-icons/project.json \\\n  --scss src/styles/icons.scss \\\n  --fonts public/fonts/\n\nconsole.log('IcoMoon icon processing initiated. Check specified output paths for generated files.');\n\n// To integrate the generated SCSS into a main stylesheet (e.g., main.scss):\n// @font-face {\n//     font-family: \"icons\";\n//     src: url(\"../fonts/icons.eot\"); /* Ensure paths are correct relative to your CSS */\n//     src: url(\"../fonts/icons.eot?#iefix\") format(\"embedded-opentype\"),\n//          url(\"../fonts/icons.woff\") format(\"woff\"),\n//          url(\"../fonts/icons.ttf\") format(\"truetype\"),\n//          url(\"../fonts/icons.svg#icons\") format(\"svg\");\n//     font-weight: normal;\n//     font-style: normal;\n// }\n//\n// .icon:before {\n//     display: inline-block; /* Example common styles for icons */\n//     position: relative;\n//     font-family: \"icons\";\n//     font-style: normal;\n//     font-weight: normal;\n//     speak: none;\n//     text-decoration: inherit;\n//     line-height: 99%;\n//     text-align: center;\n//     vertical-align: baseline;\n//     -webkit-font-smoothing: antialiased;\n//     -moz-osx-font-smoothing: grayscale;\n// }\n//\n// @import \"src/styles/icons.scss\"; // Import the generated icon definitions\n// @include icon-classes; // Include the mixin generated by icomoon-build to apply classes","lang":"javascript","description":"Illustrates how to install `icomoon-build` locally and execute it via `node_modules/.bin` to process an IcoMoon project file. It generates an SCSS stylesheet and font files, and comments explain how to integrate these into a front-end project."},"warnings":[{"fix":"It is strongly recommended to migrate to a modern icon management solution or utilize an actively maintained tool that uses up-to-date and secure dependencies (e.g., based on Playwright or Puppeteer). Avoid using `icomoon-build` in any production environment.","message":"The `icomoon-build` package is effectively abandoned (last updated August 2016) and relies on `phantomjs`, an insecure and officially deprecated headless browser. Using this package introduces significant security risks due to unpatched vulnerabilities in its core dependency and the complete lack of ongoing maintenance.","severity":"breaking","affected_versions":">=0.0.1"},{"fix":"Manually verify the tool's functionality against the current IcoMoon.io website. For reliable icon management, consider actively maintained alternatives or be prepared to manually download and integrate IcoMoon font packages.","message":"The tool's core functionality depends on its ability to interact with the IcoMoon.io website's internal structure and APIs via a headless browser. Consequently, any future updates or changes to the IcoMoon app or website are highly likely to break `icomoon-build`'s processing capabilities. Given its abandoned status, no further updates will be released to address such incompatibilities.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Upgrade to `icomoon-build` version 0.1.2 or later, which includes a fix that configures PhantomJS to choose newer, more secure SSL/TLS protocols. If an upgrade is not feasible, manually attempting to specify `--ssl-protocol=any` in the command line might mitigate the issue, though its effectiveness with very old PhantomJS versions may vary.","message":"Prior to version 0.1.2, `icomoon-build` might fail to connect to the IcoMoon website due to the deprecation of the SSLv3 protocol, leading to connection errors from the underlying PhantomJS process.","severity":"gotcha","affected_versions":"<0.1.2"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[{"fix":"Ensure `phantomjs` is correctly installed and accessible by the `icomoon-build` tool. If the error persists despite correct installation, it's likely an incompatibility with the current IcoMoon website or an unfixable bug within the abandoned `icomoon-build` project.","cause":"This error or similar messages like 'Error: The command `phantomjs` does not exist' often indicate problems with the bundled `phantomjs` binary, its installation, or a broken internal script interaction with the IcoMoon website. Version 0.2.6 specifically addressed a breakage by an updated `phantomjs` version.","error":"PhantomJS failed to render page"},{"fix":"This issue was specifically addressed and fixed in `icomoon-build` version 0.2.3. Upgrading to 0.2.3 or a later version should resolve this error.","cause":"An internal error occurring within the PhantomJS headless browser, typically related to browser local storage limits or other resource quotas being exceeded during the execution of the IcoMoon web application's scripts.","error":"QUOTA_EXCEEDED_ERR"},{"fix":"This issue was addressed in `icomoon-build` version 0.1.1. Upgrading to 0.1.1 or a later version will relax the stdout buffer limit, allowing larger outputs to be processed without error.","cause":"The output generated by the internal PhantomJS process, often for very large IcoMoon projects with numerous icons, exceeded the default buffer limit allocated for Node.js child process execution, causing the process to terminate.","error":"Error: stdout max buffer exceeded"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"icomoon-build","cli_version":null}