Icon loading with less changeVars compiles

I am using window.less.modifyVars (modified_variables); in the interface to reflect the changes. And I want to show the download icon while less compiles. Is there a way to verify that less compilation has started and completed.

+6
source share
1 answer

In the less.js GitHub report, I mentioned how they use modifyVars () in their test spec . You can show the boot icon, call the modifyVars method and then use .then () to hide the boot icon.

// Show loading icon less.modifyVars({ var1: "green", var2: "purple", var3: 20 }).then(function () { // Hide loading icon done(); }); 
-1
source

Source: https://habr.com/ru/post/983598/


All Articles