6

I ran sass --watch styles.scss:styles.css in my css folder.

And it can watch the changes if I make edits to styles.scss

But in the styles.scss, I imported some other sass files from a different folder. And if I make changes in other files, it doesn't watch and translate those changes.

Anyone know a solution?

user3338888
  • 61
  • 1
  • 2

1 Answers1

1
// main.scss
@import "./partials/_normalize";
@import "./partials/_article";

use a next command to watch both: a folder and a file

scss --watch ./partials/ ./main.scss

The underscore lets Sass know that the file is only a partial file and that it should not be generated into a CSS file http://sass-lang.com/guide

Ivan Rave
  • 1,759
  • 18
  • 15