UseMicrosoft AjaxLibrary(Sixth preview version)One of them is Ajaxmin.exe CompressJSFiles can be stored inDoSCommand/?View the parameter description.
But the Common commands are:Ajaxmin-a-h inputfile. js-O outputfile. js (This is a high compression method.)
You can alsoJSCode Analysis Command isAjaxmin inputfile. js-a-W: 3
For more usage instructions, seeHelpDescription.
Ajaxmin.exeDownload Ajaxminsetup.rar
Microsoft AjaxLibrary(Sixth preview version)Download Microsoftajaxlibrary_preview6.zip
AjaxminWhen compressing multiple files:
Ajaxmin-Inputfile_1-Inputfile_2-O-Oututfile/EO: UTF-8/EI: UTF-8
Where
/EO: UTF-8/EI: UTF-8Indicates the input/output format. If it is not specified, the default ASCII.
During the simple period, the younger brother wrote a program to execute ajaxmin.Program:
The Code is as follows:
Public void executecommond (list <string> inputfilelis, string OUTFILE)
{
For (INT I = 0; I <inputfilelist. Count; I ++)
{
Compresscode + = inputfilelist [I] + "";
}
Compresscode + = "-o" + OUTFILE + "/EO: UTF-8/EI: UTF-8 ";
System. Diagnostics. PROCESS p = new system. Diagnostics. Process ();
P. startinfo. filename = @ "C: \ Program Files \ Microsoft \ microsoft Ajax minifier \ ajaxmin.exe"; // name of the program to be started
P. startinfo. Arguments = compresscode; // the startup parameter.
P. Start (); // start
}
This is faster than manually entering commands.