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
  • Loading branch information
pieh committed Feb 5, 2018
1 parent 928914e commit 669b264
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 669b264

Please sign in to comment.