Skip to content
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

Closed
wants to merge 3 commits into from

Conversation

barroudjo
Copy link

@barroudjo barroudjo commented Apr 27, 2020

  • 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 ?
Copy link
Owner

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?

Copy link
Author

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 ;-).

@barroudjo
Copy link
Author

Are you OK with merging this pull request ? It'd be great to use this library, instead of my fork of it ;-)

@gustavopch
Copy link
Owner

gustavopch commented May 11, 2020

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).

@gustavopch gustavopch mentioned this pull request May 21, 2020
@gustavopch
Copy link
Owner

gustavopch commented May 21, 2020

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.

@jamesopti
Copy link

Hey all - Any idea when this or #7 will get merged/released? Just coming across this package and need to pass additional arguments.

Thanks!

@gustavopch gustavopch closed this May 28, 2020
@gustavopch
Copy link
Owner

@barroudjo @jamesopti I've just merged #7 and released v1.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants