I've installed the nodejs plugin in PHPStorm and setup the yuicompressor npm for minifying css/js.
I got the file watcher working so that .min.css files are produced automatically whenever i make changes to .css/.js files in the project, but notice the file watcher only kicks in on existing files if I make a change to the file.
So, if .css/.js files already exist in a project which do not require any changes, the newly defined file watcher doesn't run on them unless you go in and make a change on each file you want minified (or touched some other external way).
Assuming you have an existing project with existing .css/.js files which don't require changes, is there an easy way to run PHPStorm File Watchers without having to change the files first?
Automatically run file watchers on savePress Ctrl+Alt+S to open the IDE settings and select Tools | Actions on Save. Enable the File Watcher option and apply the changes.
Creating a File WatcherIn the Settings/Preferences dialog ( Ctrl+Alt+S ), click File Watchers under Tools. The File Watchers page opens showing a list of File Watchers that are already configured in this project and in the IDE. and choose the predefined template from which you want to create a File Watcher.
run file w
" (without quotes, obviously) and choose Run File Watchers entryAlternatively:
Alternatively:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With