当前位置: 代码迷 >> 综合 >> IDEA(pycharm,phpstorm)添加外部插件-yuicompressor压缩js/css
  详细解决方案

IDEA(pycharm,phpstorm)添加外部插件-yuicompressor压缩js/css

热度:91   发布时间:2023-09-14 10:34:38.0

IDEA(pycharm,phpstorm)添加外部插件-yuicompressor压缩js/css步骤:
1.下载yuicompressor.jar https://pan.baidu.com/s/1viwqSjhxRRn3qvUPfdrFow

2.选择File->Settings:

IDEA(pycharm,phpstorm)添加外部插件-yuicompressor压缩js/css
image.png

3.选择Tools—>External Tools,点击右侧的“+”:

IDEA(pycharm,phpstorm)添加外部插件-yuicompressor压缩js/css
image.png

4.填写信息

IDEA(pycharm,phpstorm)添加外部插件-yuicompressor压缩js/css
image.png
IDEA(pycharm,phpstorm)添加外部插件-yuicompressor压缩js/css
image.png

5.选中js文件,右键,选择External Tools—>js compress:

IDEA(pycharm,phpstorm)添加外部插件-yuicompressor压缩js/css
image.png

6、最后效果:

IDEA(pycharm,phpstorm)添加外部插件-yuicompressor压缩js/css
image.png
arguments 参数填写示例:-jar "D:\Program Files\JetBrains\PyCharm 2019.2.3\yuicompressor.jar" --type js --charset utf-8 $FilePath$ -o $FileNameWithoutExtension$.min.js-jar "D:\Program Files\JetBrains\PyCharm 2019.2.3\yuicompressor.jar" --type css --charset utf-8 $FilePath$ -o $FileNameWithoutExtension$.min.css
  相关解决方案