Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Watch all sub directories with node-sass

Tags:

npm

node-sass

I've seen many examples for watching a specific folder with node-sass, but my css isn't all in the same single folder. I'd like to have it watch all subdirectories for scss files the way you can with onchange (just for example). I'd assume that the syntax would be something like:

`node-sass -w app/**/*.scss -o app/**/`

...but that yields the error: Error: ENOENT: no such file or directory, lstat 'app/**/*.scss'

Is what I'm trying to do even possible with node-sass? If not, is there a better way to mass-compile my scss files to css? I'm trying to stick to just npm scripts for my build if possible.

like image 434
WillyC Avatar asked Oct 05 '16 16:10

WillyC


1 Answers

Try node-sass -rw app -o app. You might want to change your output folder as this might keep looping.

Source:

-r, --recursive Recursively watch directories or files https://github.com/sass/node-sass

like image 184
JordyvD Avatar answered Sep 22 '22 15:09

JordyvD