{"id":18256,"library":"cssnano-cli","title":"cssnano-cli","description":"A command-line interface for cssnano, a modular CSS minifier built on PostCSS. Version 1.0.5 (last released 2015). The CLI allows minification of CSS files via stdin/stdout or file arguments, with options for sourcemaps, disabling specific optimizations (e.g., autoprefixer, svgo), and a safe mode that disables risky transformations. This package is deprecated; PostCSS-based tools now prefer using cssnano directly via PostCSS plugins or the postcss-cli tool. No longer actively maintained.","status":"deprecated","version":"1.0.5","language":"javascript","source_language":"en","source_url":"https://github.com/ben-eb/cssnano-cli","tags":["javascript","cli","cli-app","cssnano","compress","minify","optimise","optimisation","postcss"],"install":[{"cmd":"npm install cssnano-cli","lang":"bash","label":"npm"},{"cmd":"yarn add cssnano-cli","lang":"bash","label":"yarn"},{"cmd":"pnpm add cssnano-cli","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core minifier library; CSS processing logic depends on it.","package":"cssnano","optional":false}],"imports":[{"note":"Default export from cssnano package.","wrong":"import { cssnano } from 'cssnano';","symbol":"cssnano","correct":"import cssnano from 'cssnano';"},{"note":"CommonJS require for cssnano.","wrong":"const { cssnano } = require('cssnano');","symbol":"cssnano (require)","correct":"const cssnano = require('cssnano');"}],"quickstart":{"code":"// Install: npm install -g cssnano-cli\n// Minify a file:\ncssnano input.css output.min.css\n// With sourcemap:\ncssnano input.css output.min.css --sourcemap\n// Safe mode (disable risky optimizations):\ncssnano input.css output.min.css --safe\n// Disable specific features:\ncssnano input.css output.min.css --no-autoprefixer --no-svgo\n// Using stdin/stdout:\ncssnano < input.css > output.min.css","lang":"javascript","description":"Shows basic CLI usage for minifying CSS files with cssnano-cli, including sourcemaps, safe mode, and disabling features."},"warnings":[{"fix":"Use postcss-cli with cssnano plugin: npm install -g postcss-cli cssnano; postcss input.css -u cssnano -o output.min.css","message":"cssnano-cli is deprecated; use cssnano directly with PostCSS or postcss-cli.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Switch to cssnano's PostCSS plugin or postcss-cli.","message":"No updates since 2015; incompatible with modern Node.js versions (>10).","severity":"breaking","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Install cssnano globally: npm install -g cssnano","cause":"cssnano-cli depends on cssnano but it may not be installed globally.","error":"Error: Cannot find module 'cssnano'"},{"fix":"Use an alternative tool like postcss-cli with cssnano plugin.","cause":"Known issue with Node.js >= 10 due to legacy dependency 'graceful-fs' in an older version of 'readdirp' pulled in by cssnano-cli.","error":"ReferenceError: primordials is not defined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}