Is there a way to watch all sass directories and generate CSS files to the corresponding 'CSS' folder, including subdirectories? The current method involves listing each directory separately in the NPM script.
"scripts": {
"sass": "sass --watch parent-directory/sass:parent-directory/css sub-directory/sass:sub-directory/css"
}
This approach becomes inefficient as the project expands with more subdirectories. Here is the project structure, and I am seeking a code solution that can compile from the 'sass' folder to the respective 'css' folder with subdirectories included:
parent-directory:
-sass
-css
sub-directory1:
--sass
--css
sub-directory2:
--sass
--css
I tried using the following code, but it resulted in CSS files being generated in the same 'sass' folder instead of the 'css' folder:
"scripts": {
"sass": "sass --watch ."
},