如何自动缩小PhpStorm/WebStorm中的html文件?

编程入门 行业动态 更新时间:2024-10-27 08:27:54
本文介绍了如何自动缩小PhpStorm/WebStorm中的html文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

对于CSS文件,我已经创建了一个文件监控器,如本手册中所述.另请参阅手册,它们均使用YUI压缩器

For CSS files I have created a file watcher like described in this manual. Also for JS files, see manual, which both uses the YUI Compressor

但是我没有找到如何添加文件查看器,以最小化html文件(例如,删除注释,..).如何使用PhpStorm自动缩小html文件?

But I didn't find how to add file watchers, which minify html files (e.g. removing comments, ..). How can I automatically minify html files with PhpStorm?

推荐答案

我建议您查看 HTMLMinifier -具有CLI,因此可以将其设置为文件监视程序,也可以将其配置为 Grunt任务或 Gulp任务,并使用Grant/Gulp控制台执行

I'd suggest looking at HTMLMinifier - it has CLI and thus can be set up as a file watcher, also it can be configured as Grunt task or Gulp task and executed using Grant/Gulp console

更多推荐

如何自动缩小PhpStorm/WebStorm中的html文件?

本文发布于:2023-06-02 08:36:29,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/440291.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件   PhpStorm   WebStorm   html

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!