mirror of
https://github.com/less/less.js.git
synced 2026-04-09 03:00:20 -04:00
Merge branch 'master' of https://github.com/cloudchen/less.js
Conflicts: lib/less/browser.js
This commit is contained in:
@@ -160,6 +160,13 @@ function createCSS(styles, sheet, lastModified) {
|
||||
}
|
||||
}
|
||||
|
||||
function postProcessCSS(styles) {
|
||||
if (less.postProcessor && typeof less.postProcessor === 'function') {
|
||||
styles = less.postProcessor.call(styles, styles) || styles;
|
||||
}
|
||||
return styles;
|
||||
}
|
||||
|
||||
function errorHTML(e, rootHref) {
|
||||
var id = 'less-error-message:' + extractId(rootHref || "");
|
||||
var template = '<li><label>{line}</label><pre class="{class}">{content}</pre></li>';
|
||||
@@ -576,7 +583,9 @@ function initRunningMode(){
|
||||
if (e) {
|
||||
error(e, sheet.href);
|
||||
} else if (root) {
|
||||
createCSS(root.toCSS(less), sheet, env.lastModified);
|
||||
var styles = root.toCSS(less);
|
||||
styles = postProcessCSS(styles);
|
||||
createCSS(styles, sheet, env.lastModified);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -646,7 +655,9 @@ less.refresh = function (reload, modifyVars) {
|
||||
log("loading " + sheet.href + " from cache.", logLevel.info);
|
||||
} else {
|
||||
log("parsed " + sheet.href + " successfully.", logLevel.debug);
|
||||
createCSS(root.toCSS(less), sheet, env.lastModified);
|
||||
var styles = root.toCSS(less);
|
||||
styles = postProcessCSS(styles);
|
||||
createCSS(styles, sheet, env.lastModified);
|
||||
}
|
||||
log("css for " + sheet.href + " generated in " + (new Date() - endTime) + 'ms', logLevel.info);
|
||||
if (env.remaining === 0) {
|
||||
|
||||
Reference in New Issue
Block a user