A JavaScript compression tool: X2jscompactor_javascript Tips

Source: Internet
Author: User
Tags microsoft website
A JavaScript compression tool written last year for x2blog.cn JS compression. However, there has been no external release, now take to fill a number of articles, the old do not update the blog can not be good, hehe

Overview:
X2javascriptcompactor can package multiple JavaScript script files into a single file and delete comments, unwanted blanks, and line wraps in the original file. Not only can reduce the network transmission quantity effectively, simultaneously causes the script file to be difficult to analyze and to crack. The software also supports multiple files at the same time packaging, that is, you can build multiple output files, each output file corresponding to a certain input file, each output file corresponding to the input file is unrelated.

Description
On the internet has been unable to find the appropriate JS packaging tools, compressed files often can not be executed, so I wrote this tool, development is based on the. NET 1.1 framework, so the correct implementation must be equipped with the. NET Framework, can be downloaded to the Microsoft website free of charge: http:// Download.microsoft.com/download/7/b/9/7b90644d-1af0-42b9-b76d-a2770319a568/dotnetfx.exe. At the same time, for the sake of development efficiency, the system does not have a detailed parsing of JavaScript, so in order to ensure that the compressed JavaScript files execute correctly, the following conventions must be met:
1. The original document can be executed correctly;
2. The end of the structure does not necessarily need to add a semicolon: that is, var f=function () {},var a={p1:1,p2:2} such a statement at the end without a semicolon, of course, can also be added;
3. The end of the ordinary statement must have a semicolon: such as Var a=1; alert (a); Such a normal statement must end with a semicolon.
I believe that even without this agreement, we will write JavaScript according to this syntax, this note is only to emphasize that, after all, the JavaScript specification does not force the semicolon to end.

Use process:
1. New or open a project, suffix is *.JCP;
2. Set up the output file, save the compressed file content, you can select the existing file, or create a new file;
3. Select an output file, select the corresponding input file for this file, the list will be displayed on the left;
4. Adjust the order of the input files so that they conform to the order of execution and can be executed by up and down arrows;
5. Click on the Start Compression button, the software will automatically analyze the input file, and compression package to the output file;
6. You can decide whether or not to save the project file as needed.

Local Downloads
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.