3

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

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?

1 Answer 1

3

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

Sign up to request clarification or add additional context in comments.

3 Comments

I've never made a custom file watcher, could you help me with what to fill in at 'Program', 'Arguments' and 'Output paths to refresh'?
it's in Russian, but includes screenshot + settings for 'argiuments', 'Output paths to refresh', etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.