Reputation: 2759
I have a large team working on a repo using Typescript, and nobody checks in the /typings
folder into the team's shared repository, they only check in the typings.json
file which specifies the version information for each definition set required by the project.
Sometimes someone will delete a definition set from typings.json
, since the part of the project they are working on no longer uses that library (or we found a better definition set), using
typings uninstall --global --save dt~whatever
, and that works fine on their local machine, BUT when they push up the new typings.json
and I or someone else pulls it down, when we then run typings install
, the command only adds new definitions to the typings
folder, and does not delete definitions from the typings
folder which are no longer present in typings.json
.
Is there a command which I can run to both add new definition sets and delete removed sets by diffing the current typings.json
from the state of typings.json
when the typings
command was last run?
Currently we just have everyone delete the entire typings
folder and run typings install
again each time they pull, but that is getting to be a bit inefficient, since we have a lot of definition sets now.
NOTE: we tried typings uninstall
and typings uninstall --save
but those just throw errors (it seems you may only specify specific definition sets to uninstall).
Upvotes: 1
Views: 124
Reputation: 7203
Use
typings prune
on your project directory. It will remove all typings that are present on the typings
directory and not listed on your typings.json
file.
More info on the Typings documentation.
Upvotes: 1