Skip to content

Commit 91b9764

Browse files
authored
Merge pull request #35 from Dzuelu/cliGenSearchPlaces
Use cli generateSearchPlaces to find config
2 parents 34f2cb5 + 730d6f5 commit 91b9764

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

src/extension.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import cloneDeep from 'lodash.clonedeep'
77
import { YamlCliFlags } from '@graphql-codegen/cli'
88

99
import globby from 'globby'
10-
import { generateSearchPlaces } from './generateSearchPlaces'
1110

1211
/**
1312
* Current workspace directory
@@ -105,7 +104,11 @@ const getConfigPath = async () => {
105104
return makePathAbsolute(userConfigPath)
106105
}
107106

108-
const foundConfigs = await globby(generateSearchPlaces('codegen'), {
107+
if (cli == null) {
108+
return; // cli should already be loaded here
109+
}
110+
111+
const foundConfigs = await globby(cli.generateSearchPlaces('codegen'), {
109112
cwd: firstWorkspaceDirectory()
110113
})
111114

src/generateSearchPlaces.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)