简体   繁体   中英

Is it possible in PhpStorm File Watcher to compile SCSS to CSS AND create minified css?

There is a --style compressed argument for compile minified css (fe compiling minified css described here ). But is it possible to compile .css AND .min.css at the same time?

Or I should create separate minify file watcher? (I tried to create 2 scss file watcher, one for .css and second for .min.css, but the second one replaced the first one, and I got only minified css).

Possible solutions:

  1. Create 2 files watchers - SCSS->CSS and CSS->MIN.CSS . Use any available CSS uglifier for the second one - YUI Compressor , for example. See https://www.jetbrains.com/help/webstorm/2016.3/minifying-css.html

  2. create a batch script that does the job (calls SCSS compiler for your .scss and then compresses the resultant CSS) and set it up as a file watcher

  3. Use Gulp/Grunt tasks to compile and minify your files. You can either set up Gulp/Grunt as file watchers, or use Gulp/Grunt watch tasks

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM