[Pkg-javascript-commits] [less.js] 04/38: Better output for the warning when file size exceeds

Jonas Smedegaard dr at jones.dk
Mon Oct 26 23:27:23 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag v2.2.0
in repository less.js.

commit 0dfb2416d112759af6543c2b27336005feba6a9d
Author: Bass Jobsen <bass at w3masters.nl>
Date:   Mon Dec 15 12:02:22 2014 +0100

    Better output for the warning when file size exceeds
    
    As far as i understand does the logger.warn() function not accept such string neither has Less a built-in string format  function?
---
 lib/less/functions/data-uri.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/less/functions/data-uri.js b/lib/less/functions/data-uri.js
index dd2304b..abf4862 100644
--- a/lib/less/functions/data-uri.js
+++ b/lib/less/functions/data-uri.js
@@ -62,7 +62,7 @@ module.exports = function(environment) {
         if (fileSizeInKB >= DATA_URI_MAX_KB) {
 
             if (this.context.ieCompat !== false) {
-                logger.warn("Skipped data-uri embedding of %s because its size (%dKB) exceeds IE8-safe %dKB!", filePath, fileSizeInKB, DATA_URI_MAX_KB);
+                logger.warn("Skipped data-uri embedding of " + filePath + " because its size (" + fileSizeInKB.toFixed(1) + "KB) exceeds IE8-safe " + DATA_URI_MAX_KB.toFixed(1) + "KB!");
 
                 return fallback(this, filePathNode || mimetypeNode);
             }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/less.js.git



More information about the Pkg-javascript-commits mailing list