user2167582
user2167582

Reputation: 6368

How to trigger node-sass to compile with a watch file like the way grunt and ruby sass does?

As the title stated, I want to node-sass to watch/compile scss files to css without running the command over and over again.

Edit: Is there a grunt task that can run node-sass instead of ruby sass? Because what I've seen is grunt-contrib-sass/compass all use ruby.

Upvotes: 1

Views: 1187

Answers (2)

fernandopasik
fernandopasik

Reputation: 10453

Just use the watch flag:

node-sass src/styles.scss dist/styles.css -w src

Upvotes: 5

xiwcx
xiwcx

Reputation: 227

There is no native watch task available with node-sass, but you can use grunt-contrib-watch and grunt-sass together to achieve the desired effect.

Upvotes: 1

Related Questions