Closed Mari-Artho closed 2 years ago
See "watchers" for more details that does the same thing as you had requested.
It "watches" a particular directory and outputs the compiled css file to a directory of our choice ( or the same directory , if no output directory has been specified ).
The plugin merely delegates the functionality to the underlying sass executable as it does not do anything fancy like parsing the files etc. so the final output will be the same as that from the sass command line.
Hope that helps and works.
If there is a main SCSS file
main.scss
, the resulting CSS filemain.css
is automatically generated upon saving it. However, the plugin is not aware of changes in dependencies. If an included file (e.g.,_foo.scss
from@use 'foo'
) changes and is saved, nothing happens. The plugin should analyze these dependencies (which are easy to parse at compile time) and also check if files that the main file refers to change.Steps to reproduce:
main.scss
and a file_foo.scss
.@use 'foo'
into main.scss at timet1
._foo.scss
at timet2
. Check the timestamp ofmain.css
: it is stillt1
but should bet2
. (The last modification in_foo.scss
is not included inmain.css
yet, untilmain.scss
is modified and the recompilation is finally triggered.)