Abridge is a streaming minifier for JS and CSS, forked from node-minify (v0.5.3). It improves on the original by using streams, piping to child process stdin instead of temp files, and dropping support for Google Closure Compiler. The API preserves the old style but adds a simpler minify() function with a callback that receives minified data. Supports UglifyJS (default for JS) and YUI Compressor (default for CSS, requires Java). Currently in maintenance status; last release was in 2016.
npm install abridgeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates three calling conventions: simple file+callback, multiple files, and options object.
Install Java Runtime Environment (JRE) and ensure 'java' is in PATH, or use only JavaScript files.
Replace 'new Minifier({...})' with 'abridge.minify({...})'.Update callbacks to accept a second argument: function(err, data).
Ensure fileIn is an array when providing multiple files, or a string for single file.
Install Java JRE (e.g., 'apt-get install default-jre' on Debian/Ubuntu) and ensure 'java' command works.
Use CommonJS require: const abridge = require('abridge');Use abridge.minify() with a callback function(err, data).
Check argument order: minify(fileIn, fileOut, callback) or minify(options, callback).