show how long less takes to compile

pull/1/head
Caleb James DeLisle 7 years ago
parent c5105d7b84
commit 792f7bcc64

@ -134,10 +134,15 @@ define([
};
module.exports.load = function (url /*:string*/, cb /*:()=>void*/) {
var btime = +new Date();
var done = function () {
console.log("Compiling [" + url + "] took " + (+new Date() - btime) + "ms");
cb();
};
cacheGet(url, function (css) {
if (css) {
inject(css, url);
return void cb();
return void done();
}
console.log('CACHE MISS ' + url);
((/\.less([\?\#].*)?$/.test(url)) ? loadLess : loadCSS)(url, function (err, css) {
@ -145,7 +150,7 @@ define([
var output = fixAllURLs(css, url);
cachePut(url, output);
inject(output, url);
cb();
done();
});
});
};

Loading…
Cancel
Save