Skip to content
Lightweight command line tool that minifies js files.
Kotlin
Branch: master
Clone or download

readme.md

JavaScript Minifier

Lightweight command line tool that utilises the great work of javascript-minifier.com, to minify js files.

Installation

Add a jsmin script to your PATH, replacing x.y.z with version.

# *nix shell script
java -jar /path/to/jsmin-x.y.z.jar "$@"

# windows batch file
@java -jar /path/to/jsmin-x.y.z.jar %*

Usage

You can minify single files or entire directories and optionally specifiy an alternative output directory.

$ jsmin src/my_file.js
# Creates my_file.min.js in the src directory

$ jsmin src/my_file.js out
# Creates my_file.min.js in the out directory

$ jsmin src out
# Minifies all files in src and puts results in out

$ jsmin src out -r
# Same as before including subdirectories

See Also

You can’t perform that action at this time.