Skip to content
This repository has been archived by the owner on Oct 28, 2020. It is now read-only.

Commit

Permalink
feat: log version, module, and files (#59)
Browse files Browse the repository at this point in the history
* feat: log version, module, and files

* cr
  • Loading branch information
brandonocasey authored and yowainwright committed Sep 9, 2018
1 parent 946aa2a commit 3de6d31
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ prog
const acornOpts = { ecmaVersion: e, silent: true }
if (esmodule) { acornOpts.sourceType = 'module'}

logger.debug(`ES-Check: Going to check files using version ${e}${esmodule ? ' with esmodule set' : ''}`)

files.forEach((pattern) => {
/**
* pattern => glob or array
Expand All @@ -114,6 +116,8 @@ prog

globbedFiles.forEach((file) => {
const code = fs.readFileSync(file, 'utf8')

logger.debug(`ES-Check: checking ${file}`)
try {
acorn.parse(code, acornOpts)
} catch (err) {
Expand Down

0 comments on commit 3de6d31

Please sign in to comment.