Jackson
Jackson

Reputation: 1184

sass compile css to multiple locations

I would like to make sass --watch compile the same sass into 2 identical css files in 2 separate locations.

E.g

sass --watch 
MY/PATH/sassfile.scss:MY/CSSPATH/cssfile.css
MY/PATH/sassfile.scss:../../../../MY/ALTERNATIVE/LOCAL/SITE/ROOT/cssfile.css

Any ideas?

Upvotes: 0

Views: 320

Answers (1)

Gökay Gürcan
Gökay Gürcan

Reputation: 1092

sass --watch style.scss:path/to/file1.css style.scss:path/to/file2.css

This is creating two watcher and outputting two files into the given folders.

Example output.

sass --watch style.scss:path/to/file1.css style.scss:path/to/file2.css
>>> Sass is watching for changes. Press Ctrl-C to stop.
directory path/to
  write path/to/file1.css
  write path/to/file1.css.map
  write path/to/file2.css
  write path/to/file2.css.map

Upvotes: 2

Related Questions