removed all the testing stuff from the server adapter
This commit is contained in:
parent
06dfff51d4
commit
ba2a3e88a7
@ -1,16 +1,4 @@
|
||||
var sys = require('sys'),
|
||||
events = require('events'),
|
||||
fs = require('fs'),
|
||||
path = require('path'),
|
||||
inspect = require(__dirname + '/../../../../eyes/lib/eyes').inspector({
|
||||
styles: {
|
||||
string: 'green',
|
||||
special: 'cyan',
|
||||
key: 'bold'
|
||||
}
|
||||
});
|
||||
|
||||
GLOBAL.inspect = inspect;
|
||||
var path = require('path');
|
||||
|
||||
require.paths.unshift(path.join(__dirname, '..', '..'));
|
||||
|
||||
@ -22,30 +10,8 @@ process.mixin(less, require('less/parser'));
|
||||
'keyword', 'variable', 'ruleset', 'element',
|
||||
'selector', 'quoted', 'expression', 'rule', 'call'
|
||||
].forEach(function (n) {
|
||||
process.mixin(less.parser, require('less/node/' + n));
|
||||
process.mixin(less.parser, require(path.join('less', 'node', n)));
|
||||
});
|
||||
|
||||
var path = "test/test.less";
|
||||
fs.stat(path, function (e, stats) {
|
||||
fs.open(path, process.O_RDONLY, stats.mode, function (e, fd) {
|
||||
fs.read(fd, stats.size, 0, "utf8", function (e, data) {
|
||||
var tree, css, start, end;
|
||||
|
||||
start = new(Date);
|
||||
tree = less.parser.parse(data);
|
||||
end = new(Date);
|
||||
|
||||
sys.puts("parsed in " + ((end - start) / 1000) + "s at " + parseInt(1000 / (end - start) * data.length / 1000) + " KB\/s");
|
||||
|
||||
start = new(Date);
|
||||
css = tree.toCSS([], {frames: []});
|
||||
end = new(Date);
|
||||
|
||||
sys.puts(css.substr(0,4000));
|
||||
sys.puts("generated at " + parseInt(1000 / (end - start) * data.length / 1000) + " KB\/s");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
process.mixin(exports, less);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user