Code compression problems

Source: Internet
Author: User
I want to use online tools to compress JavaScript and css code.
But you don't have:
1. delete the compressed file
2. change the source code file name to the official file name.
3. modify the code
4. change the source code file name back.
5. compress data on the website
6. generate a compressed file
7. Upload

This is so troublesome... and there are several js files and several css files on the website...
Is there any way to simplify the process.

PS: It is mainly because my code has a lot of comments, which saves a lot of traffic and is safe to compress.


Reply to discussion (solution)

You are the first choice to install a compression tool.
Online compression websites also support file packaging

You reminded me
You only need to install a code compression tool.
Use a batch processing method in the background to automatically convert all xxx. js into xxx_min.js.
Then, the system reads xxx_min.js in the official environment based on the configuration, and reads xxx. js in the debugging environment.
In this way, you do not need to change the file name or compress one by one (online is really a pitfall)
That's it.

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.