[Pkg-javascript-commits] [less.js] 71/88: when in lint mode, report errors from creating css. Fixes #1786

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


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

js pushed a commit to annotated tag v1.7.0
in repository less.js.

commit ca06fee982cb32b0f3253e3f9eb611f622e34ab5
Author: Luke Page <luke.a.page at gmail.com>
Date:   Fri Feb 21 11:32:28 2014 +0000

    when in lint mode, report errors from creating css. Fixes #1786
---
 bin/lessc | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/bin/lessc b/bin/lessc
index b36c062..7530b30 100755
--- a/bin/lessc
+++ b/bin/lessc
@@ -352,8 +352,9 @@ var parseLessFile = function (e, data) {
                 sys.print(file + " ")
             }
             sys.print("\n");
-        } else if(!options.lint) {
+        } else {
             try {
+	        if (options.lint) { writeSourceMap = function() {} }
                 var css = tree.toCSS({
                     silent: options.silent,
                     verbose: options.verbose,
@@ -374,15 +375,17 @@ var parseLessFile = function (e, data) {
                     strictUnits: options.strictUnits,
                     urlArgs: options.urlArgs
                 });
-                if (output) {
-                    ensureDirectory(output);
-                    fs.writeFileSync(output, css, 'utf8');
-                    if (options.verbose) {
-                        console.log('lessc: wrote ' + output);
-                    }
-                } else {
-                    sys.print(css);
-                }
+		if(!options.lint) {
+                    if (output) {
+                        ensureDirectory(output);
+                        fs.writeFileSync(output, css, 'utf8');
+                        if (options.verbose) {
+                            console.log('lessc: wrote ' + output);
+                        }
+                    } else {
+                        sys.print(css);
+		    }
+		}
             } catch (e) {
                 less.writeError(e, options);
                 currentErrorcode = 2;

-- 
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