mirror of
https://github.com/less/less.js.git
synced 2026-01-22 21:58:14 -05:00
Add a lint option to lessc
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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.");
|
||||
|
||||
Reference in New Issue
Block a user