
lessen
Lessen is a lightweight CSS+LESS parser that's also capable of variable substitution and beautification of its output. It's consisted of a set of relatively independent "tokenizers" that you chain in a pipeline to transform the input to the output.
How to use:
``` // Define variables Map variables = new HashMap(); variables.put("module", "foo"); variables.put("theme", "midnight");
// Open a Less tokenizer Tokenizer tokenizer = Utilities.openLess(new File(filePath), variables);
// Wrap it with more tokenizers to get the output you want tokenizer = new UrlRewritingTokenizer(tokenizer, "../modules/foo/styles/"); tokenizer = new CondensingTokenizer(tokenizer); tokenizer = new IndentingTokenizer(tokenizer);
// Print out the output Utilities.print(tokenizer, System.out); ```
Project Information
- License: New BSD License
- 2 stars
- svn-based source control