Microsoft Ajax minifier compression JavaScript method _javascript Tips

Source: Internet
Author: User

But the commonly used command is ajaxmin-a-H inputfile.js-o outputfile.js (This is a high compression method)

The JS code can also be analyzed command is ajaxmin inputfile.js-a-w:3


For more information, refer to the help instructions.
Ajaxmin.exe Download Microsoft AJAX library (sixth preview)
Ajaxmin when compressing multiple files:
Ajaxmin-inputfile_1-inputfile_2-o-oututfile/eo:utf-8/ei:utf-8
which
The/eo:utf-8/ei:utf-8 represents the format of the input and output, if the default ASCII code is not specified.
Asked a simple period younger brother wrote a program to execute the AJAXMIN program:
The code is as follows:

Copy Code code 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"//program name to start
p.startinfo.arguments = compresscode;//Startup parameters
P.start ()/Start
}

That way, it's faster than the manual input command.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.