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

JavaScript Minifier

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


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 %*


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.