In my ASP.NET MVC application I have an action that returns LESS variables.
I would like to import these variables into my main LESS file.
What is the recommended approach for doing this since DotLess will only import files with .less or .css extensions?
I found the easiest solution was to implement
IFileReader.The implementation below makes a HTTP request to any LESS path prefixed with “~/assets”, otherwise we use the default
FileReader.Note that this is prototype code:
To register the reader, execute the following when your application starts: