Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parser documentation? #1131

Closed
pknepper opened this issue Jan 14, 2013 · 3 comments
Closed

Parser documentation? #1131

pknepper opened this issue Jan 14, 2013 · 3 comments

Comments

@pknepper
Copy link

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?

@lukeapage
Copy link
Member

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

@lukeapage
Copy link
Member

moved here

less/old-lesscss.org#61

@skw
Copy link

skw commented Jun 16, 2013

The documentation does not note the a filename must be declared as of 1.4....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants