Registry / devops / cssmin-cli

cssmin-cli

JSON →
library0.0.5jsnpmunverified

A command-line tool and library for minifying CSS files, based on a JavaScript port of YUICompressor. This package is a fork of jbleuzen/node-cssmin that adds the ability to output the minified CSS to a file from the CLI. Version 0.0.5, last updated in 2016. It has no active maintenance and is largely superseded by more modern CSS minifiers like cssnano or clean-css. Works in Node.js only.

devops
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

The package only supports CommonJS require. No named export.

import cssmin from 'cssmin'

The package is CJS-only; named imports in ESM will fail.

const cssmin = require('cssmin')

Shows how to require the module, read a CSS file, minify it, and write the result to a new file.

const cssmin = require('cssmin'); const fs = require('fs'); const input = fs.readFileSync('input.css', 'utf8'); const minified = cssmin(input, 10000); fs.writeFileSync('output.css', minified, 'utf8'); console.log('CSS minified successfully');
Debug
Known footguns
deprecatedPackage is unmaintained and uses an old YUICompressor port. Modern alternatives (cssnano, clean-css) are faster and more reliable.
gotchaThe output is one long line if linebreakpos is not specified; large files may cause memory issues.
gotchaThe function takes CSS as a string, not a file path. Passing a file path will not work.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
8 hits · last 30 days
gptbot
3
ahrefsbot
2
Resources