javascript - Is there any PHP class that can compress JS and CSS?

WBOY
Release: 2016-08-23 09:17:44
Original
1153 people have browsed it

Because the environment requires offline compression of JS and CSS, it is impossible to use the online compression function of the network.
So I want to find a PHP class to compress JS or CSS.
I can’t find a particularly good one on github, so I want to ask everyone. I hope Recommended, thank you!

Reply content:

Because the environment requires offline compression of JS and CSS, it is impossible to use the online compression function of the network.
So I want to find a PHP class to compress JS or CSS.
I can’t find a particularly good one on github, so I want to ask everyone. I hope Recommended, thank you!

https://gist.github.com/tovic...

Yes, you can search and find it, but most of them are simple pieces of code or not very maintainable.

If the environment requires offline compression, using node is a good solution. After all, it is a mainstream compression solution.

CSS-JS-Booster
https://github.com/Schepp/CSS...

You can directly use webpack or gulp on the front end.
If you find it troublesome, just find an online compression website and go through their compression interface when submitting.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template