Skip to content

Commit

Permalink
use babel traverse (#156)
Browse files Browse the repository at this point in the history
* use babel traverse

* remove log statement

* remove semicolon

Closes #121
  • Loading branch information
JoviDeCroock committed Jun 14, 2020
1 parent 727459f commit d5d44a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -27,6 +27,7 @@
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.9.2",
"@babel/traverse": "^7.10.1",
"cosmiconfig": "^6.0.0",
"resolve": "^1.15.1"
},
Expand Down
3 changes: 2 additions & 1 deletion src/index.js
@@ -1,5 +1,6 @@
const p = require('path')
const resolve = require('resolve')
const traverse = require("@babel/traverse").default
// const printAST = require('ast-pretty-print')

const macrosRegex = /[./]macro(\.js)?$/
Expand Down Expand Up @@ -228,7 +229,7 @@ function applyMacros({
*
* See: https://github.com/kentcdodds/import-all.macro/issues/7
*/
state.file.scope.path.traverse({
traverse(state.file.ast, {
Identifier() {},
})

Expand Down

0 comments on commit d5d44a6

Please sign in to comment.