finiteloop
finiteloop

Reputation: 4496

Is there a way to pre-define directories for SASS to watch?

I have recently started using SASS in my web development. Thus far, I've found it to be a very useful utility, however I have run into a minor usibility issue.

This website I am working on has SASS files in multiple locations, for example in /css as well as in /blog/css.

Currently, to keep sass watching both directories, I need to create two different terminal tabs and run sass --watch css/:css/ on one, and sass --watch blog/css/:blog/css/ on the other.

It would be awesome if I could make a file or something of the following format:

css/:css/
blog/css/:blog/css/

And then just pass this config file to sass and have it watch both locations. Is this possible?

Upvotes: 1

Views: 237

Answers (1)

bookcasey
bookcasey

Reputation: 40423

You could use foreman to run multiple processes:

gem install foreman

Create a Procfile in the root directory and add something along these lines:

sass:  sass --watch css/:css/
sass: sass --watch blog/css/:blog/css/

To start both use:

foreman start

Upvotes: 1

Related Questions