MiniME - Command Line

Invoking MiniME from the command line or a build environment

Once you've downloaded MiniME, you'll need to extract the binaries to somewhere on your path, or update your path to include the folder containing the MiniME files. Typically MiniME should be called from your build process, but it can also be run directly from a command prompt or terminal.

MiniME runs under Windows with .NET 3.5 installed. It has also been know to run under Mono on Linux and Mac OS X - though this has not been tested extensively.

Invoking MiniME

To run MiniME simply pass the name of the JavaScript file (or files) you want to process:

mm MyJavaScriptFile.js

This will produce a file named MyJavaScriptFile.min.js in the same folder as the input file.

For Linux/Mac users with Mono installed use the following command format:

mono mm.exe MyJavaScriptFile.js

Command Line Reference

MiniME supports the following command line arguments:

Sets the name of the output file
Send the output to stdout rather than a file.
Sets the maximum line length. By default, MiniME inserts line breaks every 120 characters. Use this option to override this behaviour. Specify 0 for no line breaks.
Disable all obfuscation - just remove whitespace, comments etc...
Prevents MiniME from inserting a small credit comment mentioning itself.
Specifies the character encoding of any input files that follow on the command line.
Specifies the character encoding of the output file. If not specified, the same character encoding of the first input file is used.
Generates a list of available character encoding names.
Sets the current directory to <directory>, which will be used for any subsequent unqualified command line path arguments.
Checks the timestamp of all input files (including response fles) and only generates the output file if one or more input file has changed. This option also creates a file named <outputfile>.minime-options that stores the options used. For -check-filetimes to work, the same set of command line arguments must be specified.
Don't use or create the options file normally created by -check-filetimes.
Don't display code quality warnings for any subsequent files on the command line
Turn code quality warnings back on for subsequent files.
Forces CSS compression instead of Javascript minification. Only required if using unusual file extensions.
Forces Javascript minification over CSS compression. Only required if using unusual file extensions.
Load command line arguments from a file name <responsefile>. While processing the arguments in the response file, the current directory is changed to the directory of the response file.
-h or -?
Display command line help
Display the MiniME version header and quit.
Don't show the MiniME logo. Use with -stdout to get a clean output.

Diagnostics Options

The following options are intended for developers working on MiniME, but might also be useful during general usage.

Format the output to make it more readable (though probably not as readable as the original source code - unless you're a really messy coder!). Possibly useful for de-obfuscating previously obfuscated scripts - good luck with that!
Displays symbol allocation information in the generated output.
Dumps the entire parsed abstract syntax tree to stdout.
Dumps information about all function scopes to stdout.

See also API and In-script Directives.