Répás
Répás

Reputation: 1820

SASS watch N folders without define them

I have a server with a folder structure like:

/var/www/aaa.com/
/var/www/bbb.com/
/var/www/ccc.com/

and with sass files, like:

/var/www/aaa.com/aaa.scss
/var/www/bbb.com/something/bbb.scss
/var/www/ccc.com/something/else/ccc.scss

Can i use only one watch command, to compile all the .scss files to the scss' directory? To compile to the same folder is perfect for me. Like this:

sass --watch /var/www/^(.*)$:/var/www/$1

And the result:

/var/www/aaa.com/aaa.scss -> /var/www/aaa.com/aaa.css

So I do not care about the structures or anything I just want the watch keep listening to EVERY scss files in the big structure, and if something changes, simply compile to the same folder. That's all.

Thanks for the help guys.

Upvotes: 1

Views: 89

Answers (1)

andreas
andreas

Reputation: 16936

You can just watch the scss root folder:

sass --watch /var/www/:/var/www/

Upvotes: 1

Related Questions