This tool is used to compress JS and CSS files, can remove extra space, wrap, and modify the function name becomes difficult to read and so on.
After downloading this tool, an. msi file can be installed. After installation, operate on the command line (and document) Http://ajaxmin.codeplex.com/documentation
So in the tool online compression, this can get vs, in the release of the package when the JS and CSS is automatically compressed.
How to add a compile-time event to VS, refer to this link
Http://ajaxmin.codeplex.com/wikipage?title=AjaxMinTask
The basic command inputfile.js is the file to be compressed (full pathname)-out (-O) is the file after the command parameter outputfile.js is compressed (can be a full path name)
>ajaxmin Inputfile.js–out Outputfile.js
>ajaxmin inputfile.js–out outputfile.js–clobber//Plus this parameter, you can overwrite the existing file when generating the compressed file.
>ajaxmin-analyze//If you want to parse the script and look for possible errors, you can add this option
>ajaxmin file1.js file2.js file3.js-out files.js//So, three files will be compressed into a file.
>ajaxmin file1.js-o min/file1.js-enc:out utf-8//This parameter is used to set the encoding of the output file. Generally, Chinese is not garbled. Because its default output is UTF-8
command input can be cumbersome and eventually written into a WinForm program. Click to select the directory where you want to compress the JS file. Then compress it. You can check whether you want to keep the files before compression.
Ajaxmin.exe Command Parameters