Configuring YUI Compressor in PHPStorm to compress css and js files
The last notes
All English-language materials have been translated fully automatically using the Google service
Go to Tools - & gt; File Watchers
and add two entries like in the photo
![PHPStorm Filewatchers PHPStorm Filewatchers](/upload/medialibrary/72d/72deecfab15e90b3fcc6d491f12e1593.jpg)
Customize each post like in the photo
![Настройки PhpStorm используя YuiCompressor Настройки PhpStorm используя YuiCompressor](/upload/medialibrary/4bc/4bc22cabcde0b70a520e9802c79b5081.jpg)
Program: PATH_TO_COMPRESSOR \ yuicompressor-2.4.8.jar
Arguments: $ FileName $ -o $ FileNameWithoutExtension $ .min.js
Outpit Path: $ FileNameWithoutExtension $ .min.js
To remove the minification loop min.min.js
let's create two new Scopes
![Scopes for js and css files exclude already minified Scopes for js and css files exclude already minified](/upload/medialibrary/22e/22ee6f56b9082adab1aa0f0952feaf0c.jpg)
And select them in the Scopes
field of the corresponding minifier
file:*.js&&!file:*.min.js
file:*.css&&!file:*.min.css
Comments