Arete Arete - 1 year ago 137
Sass (Sass) Question

SASS compile expanded and compressed CSS and rename the output

I am using the command line

sass --watch style.scss --style compressed
to output a compressed CSS version of my SCSS style sheet.

Is there a way to output one expanded and one compressed CSS file, calling them respectively style.css and style.min.css?

I read the documentation without finding any information on this.

Answer Source

You could run two terminal windows, each with one watcher in it. In one you would run

sass --watch style.scss:style.css --style nested

and in the other you would run

sass --watch style.scss:style.min.css --style compressed

I am unaware of a method to do this in one line.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download