1

I'm totally new in javascript so maybe my question is stupid. I want to use LESS to create CSS file. And I want to do it from my c++ code. So I'm using Qt and QtScript for it.

1) I can execute less.js in c++ using QScriptEngine. 2) I studied less.js and found function loadInitialFileCallback(loadedFile) which takes contents of the file that I want to treat as an argument. So I can call this function from my c++ code with contents of my *.less file.

After that I will get something (I think it must be CSS-file). But I don't know where I can found my CSS-file (maybe it can be variable in less.js or something another). Also I don't know how I can pull the contents of my CSS-file. Thanks for any help:)

bin-bin
  • 532
  • 2
  • 6
  • 16
  • Does your LESS file change at runtime? Otherwise you can transform LESS -> CSS at compile time and shipt the CSS file. – Simon Warta Dec 29 '14 at 14:33
  • @Simon Warta Thanks for reply:) But my LESS file changes so I can't do what you recommend – bin-bin Dec 29 '14 at 15:01

0 Answers0