Usage in Code

You can invoke the compiler from node, as such:

var less = require('less');

less.render('.class { width: (1 + 1) }', function (e, output) {
  console.log(output.css);
});

which will output

.class {
  width: 2;
}
This entry was posted in Uncategorized. Bookmark the permalink.