tins
tins
and tuns
(for type installer and type uninstaller, respectively) are quick ways to install and uninstall packages.
If they detect that you're using types in your projects (e.g.: using or installing the typescript
module or any @types/*
module in your dependencies
or devDependencies
, or you have a tsconfig.json
file in your module root), they also install or uninstall the types of that package.
It's intelligent enough to not install the @types/
package for types embedded in the main package, and to use the same package manager as you (npm
or yarn
).
Also, it never fails if it doesn't find a package in a list of many.
Usage
tins
is fairly minimalistic for now. PRs welcome!
$ tins <packages...> [--dev]$ tuns <packages...>
Example
$ tins lodash # In a project using typescript and yarn, that's equivalent to $ yarn add lodash && yarn add --dev @types/lodash# or if you are using npm $ npm install lodash -S && npm install @types/lodash -D # And the same for tuns, but uninstalling instead of installing $ tuns lodash # For more options, see $ tins --help
Installing
# To only use once $ npx tins <packages...>$ npx -p tins tuns <packages...> # To properly install $ yarn global add tins# or $ npm install -g tins