{"id":40770,"library":"crop-awesome","title":"Crop-awesome","description":"Crop-awesome (v0.9.22) is a build-time tool that reduces Font Awesome CSS and font file sizes by removing unused icons and classes. It supports EOT, TTF, SVG, WOFF, WOFF2, and OTF font types, with configurable icon lists and helper classes. Unlike manual subsetting or online tools, it integrates as a CLI or Node.js dependency, with autocomplete for repeat runs (though buggy in global mode). Last updated in 2017, the project is in maintenance mode—no changes since, but still usable for Font Awesome 4.x.","status":"maintenance","version":"0.9.22","language":"javascript","source_language":"en","source_url":"https://github.com/CyberCookie/crop-awesome","tags":["javascript","CSS","bundle","font","font awesome","crop","font-awesome","awesome","minify"],"install":[{"cmd":"npm install crop-awesome","lang":"bash","label":"npm"},{"cmd":"yarn add crop-awesome","lang":"bash","label":"yarn"},{"cmd":"pnpm add crop-awesome","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package is CJS-only; no ESM wrapper. Use require().","wrong":"import crop from 'crop-awesome'","symbol":"default","correct":"const crop = require('crop-awesome')"},{"note":"crop is a function, not a CLI invocation. CLI uses separate binary.","wrong":"crop-awesome -icons=cog","symbol":"crop()","correct":"const crop = require('crop-awesome'); crop({icons: ['cog']})"},{"note":"Returns a Promise, not a callback. Use .then() or async/await.","wrong":"crop({...}, callback)","symbol":"crop~Promise","correct":"crop({...}).then(({css, output_path}) => ...)"}],"quickstart":{"code":"const crop = require('crop-awesome');\ncrop({\n  font_types: ['woff2'],\n  css_dest: './cropped.css',\n  icons: ['glass', 'space', 'infinity', 'taxi']\n}).then(res => {\n  console.log(`CSS written to ${res.output_path}`);\n  console.log(`Length: ${res.css.length} chars`);\n}).catch(err => console.error('Crop failed:', err));\n","lang":"javascript","description":"Shows programmatic usage: require, configure subset, handle Promise result."},"warnings":[{"fix":"Install locally or use config file via -cfg-path.","message":"Global install `-g` does not support autocomplete; answers are not stored.","severity":"gotcha","affected_versions":">=0.9.0"},{"fix":"Avoid specifying OTF in font_types unless you want an untrimmed copy.","message":"OTF font type is binary and cannot be cropped; it merely copies original file.","severity":"gotcha","affected_versions":">=0.9.0"},{"fix":"Add missing helper classes to help_classes array in config.","message":"CSS helper classes default set includes only lg, 2x, 3x, 4x, 5x, fw, border. Other FA helpers like spin, rotate are excluded unless added.","severity":"gotcha","affected_versions":">=0.9.0"},{"fix":"Use .then() or async/await instead of expecting immediate result.","message":"In version 0.9.0, the API changed from synchronous to Promise-based.","severity":"breaking","affected_versions":">=0.9.0"},{"fix":"Consider using fontawesome-subset or custom SVG icon extraction for FA5+.","message":"Project has not been updated since 2017; Font Awesome 5+ uses different structure (SVG with JS).","severity":"deprecated","affected_versions":">=0.9.0"}],"env_vars":null,"search_vec":"'2017':74 '4':90 'autocomplet':62 'awesom':3,6,17,89,97,101,102 'buggi':67 'build':11 'build-tim':10 'bundl':94 'chang':82 'class':28,46 'cli':57 'configur':41 'crop':2,5,98 'crop-awesom':1,4 'css':18,93 'depend':60 'eot':31 'file':21 'font':16,20,38,88,95,96,100 'font-awesom':99 'global':69 'helper':45 'icon':26,42 'integr':54 'javascript':92 'last':71 'list':43 'mainten':79 'manual':48 'minifi':103 'mode':70,80 'node.js':59 'onlin':51 'otf':37 'project':76 'reduc':15 'remov':24 'repeat':64 'run':65 'sinc':83 'size':22 'still':85 'subset':49 'support':30 'svg':33 'though':66 'time':12 'tool':13,52 'ttf':32 'type':39 'unlik':47 'unus':25 'updat':72 'usabl':86 'v0.9.22':7 'woff':34 'woff2':35 'x':91","created_at":"2026-06-04T18:49:10.077766+00:00","updated_at":"2026-06-04T18:49:10.077766+00:00","problems":[{"fix":"Use const crop = require('crop-awesome'); not require('crop-awesome').default.","cause":"Importing the CLI binary instead of the module function, or using ESM import.","error":"TypeError: crop is not a function"},{"fix":"Run `npm install crop-awesome --save-dev` (or without -g).","cause":"Package not installed or not in node_modules; global install not found.","error":"Error: Cannot find module 'crop-awesome'"},{"fix":"Ensure font-awesome is installed (npm install font-awesome) or specify custom path.","cause":"Font Awesome source file not found; package expects font-awesome installed or files present.","error":"ENOENT: no such file or directory, open '...'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/CyberCookie/crop-awesome","github":"https://github.com/CyberCookie/crop-awesome","docs":null,"changelog":null,"pypi":null,"npm":"crop-awesome","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}