Add a lint option to lessc

This commit is contained in:
Richard Brown
2012-08-31 14:10:02 +01:00
committed by Luke Page
parent 52e13a855a
commit fb60990145
2 changed files with 7 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ var options = {
yuicompress: false,
optimization: 1,
silent: false,
lint: false,
paths: [],
color: true,
strictImports: false,
@@ -48,6 +49,10 @@ args = args.filter(function (arg) {
case 'silent':
options.silent = true;
break;
case 'l':
case 'lint':
options.lint = true;
break;
case 'strict-imports':
options.strictImports = true;
break;
@@ -149,7 +154,7 @@ var parseLessFile = function (e, data) {
less.writeError(err, options);
currentErrorcode = 1;
return;
} else {
} else if(!options.lint) {
try {
var css = tree.toCSS({
compress: options.compress,

View File

@@ -31,6 +31,7 @@ var lessc_helper = {
sys.puts(" -h, --help Print help (this message) and exit.");
sys.puts(" --include-path Set include paths. Separated by `:'. Use `;' on Windows.");
sys.puts(" --no-color Disable colorized output.");
sys.puts(" -l, --lint Syntax check only (lint).");
sys.puts(" -s, --silent Suppress output of error messages.");
sys.puts(" --strict-imports Force evaluation of imports.");
sys.puts(" --verbose Be verbose.");