Registry / devops / minify-all-cli

minify-all-cli

JSON →
library1.0.13jsnpmunverified

Minify All CLI is a Node.js command-line tool that minifies JavaScript, CSS, and HTML files in bulk using UglifyJS (or terser), CSSNano, and HTMLMinifier, with optional gzip compression. Current stable version is 1.0.13, with infrequent updates. It supports parallelism via processCount and allows skipping files by extension or path mask. Differentiators include a unified CLI for all file types and config file support for minifier options, though it is less actively maintained and has limited documentation compared to alternatives like gulp or webpack plugins.

npm install minify-all-cli
INSTALL
IMPORT
SIG · MINIFY-ALL-CLI
M
minify-all-cli
devopsjavascriptv1.0.13
harness data pending
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.

cli
npx minify-all-cli -s src -d dist
npm run minify-all-cli
CLI tool, not a library import. Use npx or global install.
run
const { execSync } = require('child_process'); execSync('npx minify-all-cli -s src -d dist')
const minify = require('minify-all-cli')
Package exposes no programmatic API; only CLI commands.

Minify JS, CSS, HTML from ./public to ./dist using terser, 4 parallel processes, skipping source maps, with info logging.

npx minify-all-cli -s ./public -d ./dist -j -x terser -p 4 --skipFileExtensions=.map --logLevel=info
Debug
Known issues
gotchaProcess count (-p) may cause deadlocks on small file sets
fix
Use default or set -p 1 for small projects.
affects: *
deprecateduglify-js may be replaced by terser in future
fix
Use -x terser option to avoid UglifyJS deprecation.
affects: *
gotchaNested directory structure is not flattened; destination folder mirrors source
fix
Use an intermediate build tool if flat output is needed.
affects: *
gotchaNo dry-run option; files are minified immediately without preview
fix
Test on a copy of source folder first.
affects: *
Errors
Common errors & fixes
Error: Cannot find module 'uglify-js'
Missing uglify-js dependency; package may not auto-install peer deps
fix
Run `npm install -g minify-all-cli` which includes dependencies.
TypeError: Cannot read properties of undefined (reading 'minify')
Config file for -f option has incorrect structure
fix
Ensure config JSON matches the tool's expected format; check UglifyJS/terser docs.
ENOENT: no such file or directory, lstat '...'
Source path is incorrect or has spaces without quotes
fix
Use absolute path and quote paths with spaces: -s "./my folder"
Upgrade
Version history
1.0.13latest on npm
Audit
Dependencies
uglify-jsrequiredJavaScript minification
cssnanorequiredCSS minification
html-minifierrequiredHTML minification
Agent activity
2 hits · last 30 days
node
2
Resources