Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

Commit

Permalink
fix: make tsconfig.json optional
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist committed Mar 17, 2021
1 parent e79f526 commit bb9daa8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@ export type Options = {
}

export async function build({ input, outDir }: Options) {
const tsConfigFilePath = fs.existsSync('tsconfig.json')
? 'tsconfig.json'
: undefined
const project = new Project({
compilerOptions: {
allowJs: true,
declaration: true,
emitDeclarationOnly: true,
outDir,
},
tsConfigFilePath: 'tsconfig.json',
tsConfigFilePath,
skipAddingFilesFromTsConfig: true,
})
const files = await glob(input)
Expand Down

0 comments on commit bb9daa8

Please sign in to comment.