mirror of
https://github.com/less/less.js.git
synced 2026-01-23 14:18:00 -05:00
-v, --version print node's version
--debug[=port] enable remote debugging via given TCP port
--debug-brk[=port] as above, but break in node.js and
wait for remote debugger to connect
--cflags print pre-processor and compiler flags
--v8-options print v8 command line options
Documentation can be found at http://nodejs.org/api.html or with 'man node', as it's, um, used by node. Use instead. Also moved tree.node requires in tree.js
21 lines
651 B
JavaScript
21 lines
651 B
JavaScript
if (typeof(window) === 'undefined') { var tree = require(require('path').join(__dirname, '..', '..', 'less', 'tree')); }
|
|
|
|
tree.Expression = function Expression(value) { this.value = value };
|
|
tree.Expression.prototype.eval = function (env) {
|
|
if (this.value.length > 1) {
|
|
throw new(Error)("can't eval compound expression");
|
|
} else {
|
|
return this.value[0].eval(env);
|
|
}
|
|
};
|
|
tree.Expression.prototype.toCSS = function (env) {
|
|
var evaled;
|
|
evaled = this.value.map(function (e) {
|
|
if (e.eval) {
|
|
e = e.eval(env);
|
|
}
|
|
return e.toCSS ? e.toCSS(env) : e;
|
|
});
|
|
return evaled.join(' ');
|
|
};
|