0

I need to combine site.css and theme.css into site.min.css using YUI Compressor or any other plugin as a file watcher on webstorm.

I've already setup the YUI Compressor and I'm able to generate either site.min.css or theme.min.css but not both combined into just one file.

Current file watcher configuration

pissinali
  • 15
  • 6
  • 1
    So .. write yourself a shell/command script that will do that and then use it as File Watcher (it can run any program). Or use grunt/gulp or alike (you can also call their tasks via File Watcher). – LazyOne Jun 07 '19 at 13:05

1 Answers1

1

There is no way to pass multiple files to file watcher, and the YUI Compressor itself doesn't seem to support files merging (https://github.com/yui/yuicompressor/issues/255).

I can suggest using Grunt or Gulp for this - see grunt-contrib-cssmin, or gulp-uglifycss with gulp-concat. See https://gist.github.com/atelic/8eb577e87a477a0fb411, https://riptutorial.com/gulp/example/13423/concat-and-uglify-js-and-css-files for some examples.

You can run the tasks using Grunt/Gulp consoles, or configure them as file watchers if you like them to be run on files changing

lena
  • 90,154
  • 11
  • 145
  • 150