-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
various improvements: compatibility with windows, tsconfig file can be specified, tsconfig file allows comments, args can be passed to tsc #4
Conversation
barroudjo
commented
Apr 27, 2020
•
edited
Loading
edited
- compatibility with windows
- tsconfig file can be specified
- tsconfig file allows comments
- args (other than files of course, as they are already put in the temp tsconfig) are passed to tsc
const filesToCheck = args._.filter(file => /\.(ts|tsx)$/.test(file)) | ||
const argvCleaned = process.argv.slice(2) | ||
const args = yargsParser(argvCleaned) | ||
const filesToCheck = args._.filter(file => /\.(ts|tsx)$/.test(file)) // but what about globs ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you believe we should use glob instead of regex here? What would be the benefit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No , it's just that the file argument to the tsc cli can be a glob, as the example here shows:
tsc src/*.ts
And we should detect them because they should not be put in the files
property of the temporary tsconfig, but in the include
property.
I left that for later, but I put a comment to at least have the maintainers be aware of the potential issue ;-).
Are you OK with merging this pull request ? It'd be great to use this library, instead of my fork of it ;-) |
@barroudjo Sorry for the delay. I'll try to get this merged today. EDIT: I'll wait for your take on #6 (comment). |
Hey @barroudjo. I wanted to change some minor things in your PR but I think I'm not able to do that, so I just created a new PR derived from yours: #7. Can you check if it covers everything you need and also test it on Windows please? P.S.: if you know how I could edit your PR without creating a new one, please let me know. |
Hey all - Any idea when this or #7 will get merged/released? Just coming across this package and need to pass additional arguments. Thanks! |
@barroudjo @jamesopti I've just merged #7 and released v1.1.0. |