Created
August 14, 2016 11:23
-
-
Save hugdx/9c54707435e576188d2d09ff4d13eb65 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var string_less = "@color: red;a{color: @color;}"; | |
var DtyReturnVal = { | |
"error": "", | |
"css": string_less | |
}; | |
try { | |
DtyLess.render(string_less, function (error, result) { | |
if( error ) | |
throw error; | |
DtyReturnVal.css = result.css; | |
}); | |
} catch (e) { | |
DtyReturnVal.error = DtyLess.formatError(e); | |
} | |
DtyReturnVal; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment