Skip to content

Commit

Permalink
don't try to extract queries from directories with names ending in .j…
Browse files Browse the repository at this point in the history
…s(x) or .ts (#3861)
  • Loading branch information
pieh authored and KyleAMathews committed Feb 6, 2018
1 parent 9024329 commit 4969942
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,12 @@ class Runner {
async parseEverything() {
// FIXME: this should all use gatsby's configuration to determine parsable
// files (and how to parse them)
let files = glob.sync(`${this.fragmentsDir}/**/*.+(t|j)s?(x)`)
files = files.concat(glob.sync(`${this.baseDir}/**/*.+(t|j)s?(x)`))
let files = glob.sync(`${this.fragmentsDir}/**/*.+(t|j)s?(x)`, {
nodir: true,
})
files = files.concat(
glob.sync(`${this.baseDir}/**/*.+(t|j)s?(x)`, { nodir: true })
)
files = files.filter(d => !d.match(/\.d\.ts$/))
files = files.map(normalize)

Expand Down

0 comments on commit 4969942

Please sign in to comment.