Skip to content

Commit e5c78ea

Browse files
committed
Parameter to leave includes as in config file
1 parent c01619f commit e5c78ea

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cli.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ const argsProjectIndex = args.findIndex(arg =>
2626
const argsProjectValue =
2727
argsProjectIndex !== -1 ? args[argsProjectIndex + 1] : undefined
2828

29+
const argsLeaveIncludesUntouched = args.findIndex(arg => ['-i'].includes(arg))
30+
2931
const files = args.filter(file => /\.(ts|tsx)$/.test(file))
3032
if (files.length === 0) {
3133
process.exit(0)
@@ -53,7 +55,7 @@ const tmpTsconfig = {
5355
skipLibCheck: true,
5456
},
5557
files,
56-
include: [],
58+
...(argsLeaveIncludesUntouched ? {} : { includes: [] }),
5759
}
5860
fs.writeFileSync(tmpTsconfigPath, JSON.stringify(tmpTsconfig, null, 2))
5961

0 commit comments

Comments
 (0)