Skip to content

Commit

Permalink
Fix #1 by adding file extension check (only process .json and .JSON f…
Browse files Browse the repository at this point in the history
…iles)
  • Loading branch information
paulvollmer committed Nov 10, 2017
1 parent e549d3f commit dc6b8ef
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,10 @@ function processFile(file) {
function processSources(src) {
let srcStat = fs.statSync(src)
if (srcStat.isFile()) {
processFile(src)
let ext = path.extname(src)
if (ext === '.json' || ext === '.JSON') {
processFile(src)
}
}

if (srcStat.isDirectory()) {
Expand Down

0 comments on commit dc6b8ef

Please sign in to comment.