Skip to content

Instantly share code, notes, and snippets.

@hugdx
Created August 14, 2016 11:23
Show Gist options
  • Save hugdx/9c54707435e576188d2d09ff4d13eb65 to your computer and use it in GitHub Desktop.
Save hugdx/9c54707435e576188d2d09ff4d13eb65 to your computer and use it in GitHub Desktop.
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