The server side usage references a configuration that can be passed into the Parser:
http://lesscss.org/#usage
var parser = new(less.Parser)({
paths: ['.', './lib'], // Specify search paths for @import directives
filename: 'style.less' // Specify a filename, for better error messages
});
parser.parse('.class { width: (1 + 1) }', function (e, tree) {
tree.toCSS({ compress: true }); // Minify CSS output
});
Is their any documentation as to what that configuration can contain? Can it contain variables?
the site was recently updated with more info, could you try refreshing the page you link?
variables: no, but the second argument on toCSS can be an object representing a set of variables, e.g.
toCSS({compress:true}, {var1: "theme1", var2: new(tree.Color)('#f01') });
this is undocumented
The documentation does not note the a filename must be declared as of 1.4....