markdownlint-cli
Advanced tools
Comparing version 0.5.0 to 0.6.0
@@ -44,6 +44,9 @@ #!/usr/bin/env node | ||
files = files.map(function (file) { | ||
var isDir = fs.lstatSync(file).isDirectory(); | ||
if (isDir) { | ||
var markdownFiles = path.join(file, '**', '*.md'); | ||
return glob.sync(markdownFiles); | ||
try { | ||
if (fs.lstatSync(file).isDirectory()) { | ||
return glob.sync(path.join(file, '**', '*.{md,markdown}')); | ||
} | ||
} catch (err) { | ||
// Not a directory, not a file, may be a glob | ||
return glob.sync(file); | ||
} | ||
@@ -92,3 +95,3 @@ return file; | ||
.description(pkg.description) | ||
.usage('[options] <files>') | ||
.usage('[options] <files|directories|globs>') | ||
.option('-c, --config [configFile]', 'Configuration file'); | ||
@@ -95,0 +98,0 @@ |
{ | ||
"name": "markdownlint-cli", | ||
"version": "0.5.0", | ||
"version": "0.6.0", | ||
"description": "MarkdownLint Command Line Interface", | ||
@@ -44,3 +44,3 @@ "main": "markdownlint.js", | ||
"lodash.values": "~4.2.0", | ||
"markdownlint": "~0.6.1", | ||
"markdownlint": "~0.6.4", | ||
"rc": "~1.1.6" | ||
@@ -47,0 +47,0 @@ }, |
@@ -16,3 +16,3 @@ # markdownlint-cli [![Travis CI Build Status][travis-badge]][travis-url] [![AppVeyor CI Build Status][appveyor-badge]][appveyor-url] | ||
Usage: markdownlint [options] <files> | ||
Usage: markdownlint [options] <files|directories|globs> | ||
@@ -53,2 +53,3 @@ MarkdownLint Command Line Interface | ||
- [markdownlint][markdownlint] - API for this module | ||
- [glob][glob] - Pattern matching implementation | ||
@@ -70,2 +71,3 @@ ## License | ||
[test-config]: https://github.com/igorshubovych/markdownlint-cli/blob/master/test/test-config.json | ||
[rc-standards]: https://www.npmjs.com/package/rc#standards | ||
[rc-standards]: https://www.npmjs.com/package/rc#standards | ||
[glob]: https://github.com/isaacs/node-glob |
8216
94
71
Updatedmarkdownlint@~0.6.4