Command Line Options
Optional parameters will be listed at the beginning of the output as comments. This is a convenient way of replacing copyright messages and other documentation.
Example:
jsmin fulljslint.js jslint.js "(c)2002 Douglas Crockford"
Errors
JSMin can produce three error messages to stderr:
Unterminated comment.
Unterminated string constant.
Unterminated regular expression.
It ignores all other errors that may be present in your source program.
Get Minified
JSMin is a filter that omits or modifies some characters. This does not change the behavior of the program that it is minifying. The result may be harder to debug. It will definitely be harder to read.
JSMin first replaces carriage returns ('
') with linefeeds ('
'). It replaces all other control characters (including tab) with spaces. It replaces comments in the // form with linefeeds. It replaces comments in the /* */ form with spaces. All runs of spaces are replaced with a single space. All runs of linefeeds are replaced with a single linefeed.