CLI

You can compress files using the command line.

Installation

npm install -g @node-minify/cli # OR yarn add @node-minify/cli

Usage

node-minify --compressor uglify-js --input 'input.js' --output 'output.js'
cli

Options

You can pass an option as a JSON string to the compressor.

node-minify --compressor uglify-js --input 'input.js' --output 'output.js' --option '{"warnings": true, "mangle": false}'