Skip to content

Commit

Permalink
concider only local path when filtering src files
Browse files Browse the repository at this point in the history
  • Loading branch information
drapanjanas committed May 5, 2019
1 parent b2f38a6 commit c70f18c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions re-natal.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -716,13 +716,15 @@ extractRequiresFromSourceFile = (file) ->
requires: requires

buildRequireByPlatformMap = () ->
onlyUserCljs = (item) -> fpath.extname(item.path) == '.cljs' and
item.path.indexOf('/target/') < 0 and # ignore target dir
item.path.indexOf('/re-natal/') < 0 # ignore re-natal internal cljs files (can happen if re-natal is installed as a devDependency)
files = klawSync process.cwd(),
workdir = process.cwd()
onlyUserCljs = (item) ->
localpath = item.path.replace workdir, ''
fpath.extname(localpath) == '.cljs' and localpath.indexOf('/target/') < 0 and localpath.indexOf('/re-natal/') < 0

files = klawSync workdir,
nodir: true
traverseAll: true
filter: onlyUserCljs
filter: onlyUserCljs
filenames = files.map((o) -> o.path)
extractedRequires = filenames.map(extractRequiresFromSourceFile)

Expand Down

0 comments on commit c70f18c

Please sign in to comment.