Comparing version 1.0.1 to 1.0.2
12
cli.js
@@ -33,5 +33,9 @@ #!/usr/bin/env node | ||
function outputJson (content) { | ||
function outputJson (lint) { | ||
if (argv.indexOf('--silent') === -1) { | ||
console.log(cardinal.highlight(content, {json: true})); | ||
if (lint.parsed) { | ||
console.log(cardinal.highlight(lint.content, {json: true})); | ||
} else { | ||
console.log(lint.content); | ||
} | ||
} | ||
@@ -41,9 +45,9 @@ } | ||
jlint(function (lint) { | ||
outputJson(lint); | ||
if (lint.parsed) { | ||
outputJson(lint.content); | ||
console.log(symbols.success); | ||
} else { | ||
outputJson(lint.content); | ||
console.log(symbols.error, lint.exception); | ||
} | ||
}); |
{ | ||
"name": "jlint", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "CLI that parses the current JSON you have in your current clipboard", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4150
68