How to watch entire directory of scss and compile files separately in their own sub-folders?

226 views Asked by At

I have a css folder with sub-folders populated with scss files. How can I watch the whole folder and automatically generate a separate style.css file on change for every folder.

`--css
    --content
      content.scss
    --home
      home.scss
    --about
      about.scss
    --main
      main.scss`

If I change, say, content.scss I want it to generate content.css, and idealy, content.min.css.

Well. I tried to use Dart-sass, but it generates *.css.map and I need *.min.css. Dart-sass doesn't reflect to changes made in imported files like @import '../file.scss'. I tried to use concurrently, but it takes a lot of space in package.json, looks dirty and it failed every time I ran it. I have no idea how to do it with node-sass. I looked at some solutions, but most of them seem to be really old and outdated , they are all about old technologies.

0

There are 0 answers