I have a base.less
file which defines a few global variables and their values. Then I have another less
file called let's say test.less
which imports base.less
. Now when I change the base.less
, those changes. do not reflect in the test.css
unless I recompile test.less
. Is there a way to automate this without requiring to recompile test.less
?
Illustrating with an example:
base.less
@color: red;
test.less
@import "base.less";
p {
color: @color;
}
Now if I change @color: red;
to @color: blue;
in base.less
and do
lessc base.less base.css
My test.css
still continues to have the old values from base.less
i.e.
p {
color: red;
}
To fix this, I need to manually compile lessc test.less test.css
to get the changes in base.less
to reflect in test.css
. Any suggestions to avoid this manual step ? Basically I'd want that when I compile base.less
, all less
files which import it also get recompiled automatically.