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.
npm install cssmin-cliNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to require the module, read a CSS file, minify it, and write the result to a new file.
Switch to a maintained CSS minifier like cssnano or clean-css.
Provide a reasonable linebreakpos (e.g., 8000) to avoid extremely long lines.
Read the file first using fs.readFileSync or fs.readFile.
Run 'npm install cssmin' in your project directory.
Use dynamic import or switch to CommonJS with '.cjs' extension.
No dependency data recorded yet.