Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Commit

Permalink
chore: cleanup debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Jan 28, 2018
1 parent af49fa6 commit 6495736
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,8 @@ export class Config implements IConfig {
private async _tsConfig(): Promise<TSConfig | undefined> {
try {
const tsconfigPath = path.join(this.root, 'tsconfig.json')
const tsconfig = await readJSON(path.join(this.root, 'tsconfig.json'))
const tsconfig = await readJSON(tsconfigPath)
if (!tsconfig || !tsconfig.compilerOptions) return
debug('tsconfig.json found at', tsconfigPath)
return tsconfig
} catch (err) {
if (err.code !== 'ENOENT') throw err
Expand Down Expand Up @@ -373,7 +372,7 @@ export async function read(opts: ConfigOptions = {}): Promise<IConfig> {
let root = opts.root || (module.parent && module.parent.parent && module.parent.parent.filename) || __dirname
const pkgPath = await findPkg(opts.name, root)
if (!pkgPath) throw new Error(`could not find package.json with ${inspect(opts)}`)
debug('found package.json at %s from %s', pkgPath, root)
debug('reading plugin %s', path.dirname(pkgPath))
const pkg = await readPkg(pkgPath)
const config = new Config()
await config.load(path.dirname(pkgPath), pkg, opts.baseConfig)
Expand Down

0 comments on commit 6495736

Please sign in to comment.