A JavaScript compression tool: x2jscompactor

Source: Internet
Author: User
Tags microsoft website

A JavaScript compression tool written last year for JS compression of x2blog.cn. But it has never been released. Now I want to add Article It's hard to update a blog.

Overview:
X2javascriptcompactor can Package Multiple Javascript script files into one file and delete comments, useless spaces, and line breaks in the original file. This not only effectively reduces the amount of network transmission, but also makes it difficult to analyze and crack script files. The software supports simultaneous packaging of multiple files, that is, multiple output files can be created. Each output file corresponds to a certain input file, and the input files corresponding to each output file are irrelevant.

Note:
The appropriate JS packaging tool has not been found on the Internet, and the compressed files are often unable to be executed, so I wrote this tool myself, and the development is based on.. NET 1.1 framework, so the correct execution must contain. net Framework, which can be downloaded at the Microsoft website for free: Movie. At the same time, the system does not perform detailed syntax analysis on JavaScript For development efficiency. Therefore, to ensure that the compressed Javascript file can be correctly executed, it must comply with the following conventions:
1. The original file can be correctly executed;
2. you do not need to add points at the end of the constructor: namely, the end of a statement such as var f = function () {}, var A = {p1: 1, P2: 2} does not need a semicolon, of course, you can also add it;
3. A common statement must end with a semicolon, for example, var a = 1; alert (a); a common statement must end with a semicolon.
I believe that, even without this agreement, JavaScript will be written according to this syntax. In this example, we only emphasize that, after all, the Javascript specification does not require a semicolon to end.

Procedure:
1. Create or open a project with the suffix *. JCP;
2. Create an output file. Save the compressed file content here. You can select an existing file or create a new file;
3. Select an output file. Select the corresponding input file for this file, which will be displayed in the list on the left;
4. Adjust the sequence of input files to meet the execution sequence requirements. You can use the up and down arrows to execute the files;
5. Click the Start compression button. The software will automatically analyze the input file and compress it into the output file;
6. You can decide whether to save the project file as needed.

Local download

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.