Uglify JS

Use this skill when the user wants to minify JavaScript files for production — reduce bundle size, rename variables, remove dead code, and generate source maps.

javimosch cb72bae 929 B Updated

File contents

UglifyJS Plugin

UglifyJS minifies and compresses JavaScript files. Removes whitespace, shortens variable names, eliminates dead code, and optimizes expressions for smaller production bundles.

Commands

  • uglify-js _ _ <args> — Passthrough

Usage Examples

  • "minify app.js to app.min.js"
  • "minify with source map support"
  • "compress multiple JS files into one"
  • "beautify/minified code for debugging"

Installation

npm install -g uglify-js

Key Features

  • Whitespace removal and variable mangling
  • Dead code elimination
  • Expression and statement optimization
  • Source map generation
  • Multiple input concatenation
  • Beautify output option
  • Compression level control
  • CLI batch processing

javimosch/supercli/tree/main/plugins/uglify-js/skills/quickstart commit cb72baea47

Frequently asked questions

npx skillmds@latest add javimosch/uglify-js