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

Allow -i or --include argument for custom include files #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jmmendivil
Copy link

Solution for #20

Use with a single file or glob: tsc-files -i ./dir/**/*.ts
Use with a list of files, separated by coma: tsc-files -i A.ts,B.ts

@gustavopch
Copy link
Owner

Thanks for the PR, @jmmendivil, but I think it's ambiguous to let specify files both through positional (tsc-files foo.ts) and named arguments (tsc-files -i foo.ts). I think a better API would be to just identify glob patterns in the positional arguments and add them to include, so it would be used like this: tsc-files foo.ts bar/**/*.ts.

@jmmendivil
Copy link
Author

Hey, thanks for review the PR @gustavopch
The include option for the config file lets you add an array of filenames or patterns, if we restrict it to glob only, it wouldn't be exactly as the include from the config file. I could be wrong, but I thought the idea for the lib is to be as transparent as possible for the tsc config and cli args

You can use files and include arguments just fine: tsc-files -i foo.ts bar.ts

@erickbelfy
Copy link

is there any conclusion to this? i kinda of need that PR to be merged cuz I'm facing the same scenario

@gustavopch
Copy link
Owner

@erickbelfy I'm not having time to review/test because I'm super busy with work, so what I'm suggesting is that people copy the source code — which is actually quite small — and modify as needed, or fork, or use https://npm.im/patch-package to apply the changes locally. Sorry.

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