jeroenouw / liftr-tscov

Check the type coverage of any TypeScript project with this easy npm package
https://www.npmjs.com/package/@liftr/tscov
MIT License
30 stars 5 forks source link

is there a way to run this only for changed files or specific files #1

Closed agiratech-vigneshm closed 5 years ago

agiratech-vigneshm commented 5 years ago

Imagine I want to use this as a pre-push hook which checks and enforces the type coverage limit on VCS level. Is there an easy way to run this on specific files or only on changed files (VCS). I looked at the docs and couldn't find any. I Looked through the code to see if I can do it, but I realized I am not strong enough in how TSC works to understand your code.

Is there any thoughts on adding this as a feature?

farisT commented 5 years ago

Imagine I want to use this as a pre-push hook which checks and enforces the type coverage limit on VCS level. Is there an easy way to run this on specific files or only on changed files (VCS). I looked at the docs and couldn't find any. I Looked through the code to see if I can do it, but I realized I am not strong enough in how TSC works to understand your code.

Is there any thoughts on adding this as a feature?

Hello!

I have made a pull request to the repo to clarify the documentation on how tscov works with specific folders or files.

by using :

tscov -p YOURFOLDERNAME

you can test for specific folders and also refer to files within that folder.

tscov -p YOURFOLDERNAME/YOURFILENAME.ts

Hope this helps!

agiratech-vigneshm commented 5 years ago

@farisT Thanks for your help. I'll try it. @jeroenouw I am closing this.

farisT commented 5 years ago

@agiratech-vigneshm sorry I was mistaken about testing the specific filename, I thought it already existed but it didnt so I built it in now.

I have a PR waiting for approval https://github.com/jeroenouw/tscov/pull/3