Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Task to verify if necessary typings are installed, and update if not? #3

Open
teamdandelion opened this issue Feb 6, 2014 · 3 comments

Comments

@teamdandelion
Copy link

Would it make sense to build-in functionality to grunt-tsd that checks if all specified typings are present in the typings folder, and install them if any are missing?

This seems like a very fundamental use case, then you can put grunt-tsd-verify in the build task and developers never have to think about their typing files or tsd.

@Bartvds
Copy link
Collaborator

Bartvds commented Feb 6, 2014

I'm not quite clear on what your use case is:

Could be this is covered in TSD itself but not fully exposed in grunt-tsd (yet)?

If you've saved to tsd.json and want to reinstall missing files but not overwrite existing you can update without using --overwrite flag.

@teamdandelion
Copy link
Author

So, the use case is I setup a project and don't check the typing files into git, and then when someone downloads the library and runs grunt, it will detect that the typing files are missing and install them automagically.

This could be solved by just checking the definitions into git which probably makes more sense. I don't like to do that because it messes up Github's language statistics and lines-of-code counter.

@Bartvds
Copy link
Collaborator

Bartvds commented Feb 6, 2014

If you use TSD and install your definitions using --save, and check-in your tsd.json you can do this already (unless I miss-read your case).

When somebody downloads your project they can run TSD (either from cli or from grunt-tsd) and use reinstall (or update) and it will read the tsd.json and get those files.

Reinstall is safest as it is pinned to a commit-sha1 on DefinitelyTyped: sometimes definitions have breaking changes so a 'blind' update is risky.

If you want this automated you could look into npm scripts (post-install) and run grunt-tsd from there.

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

No branches or pull requests

2 participants