https://github.com/nfour/types-installer
Installs @types for your dependencies
https://github.com/nfour/types-installer
installer types typescript
Last synced: about 1 year ago
JSON representation
Installs @types for your dependencies
- Host: GitHub
- URL: https://github.com/nfour/types-installer
- Owner: nfour
- Created: 2017-04-15T07:19:47.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2020-05-28T02:09:24.000Z (about 6 years ago)
- Last Synced: 2025-03-27T11:43:34.360Z (over 1 year ago)
- Topics: installer, types, typescript
- Language: TypeScript
- Homepage:
- Size: 92.8 KB
- Stars: 71
- Watchers: 2
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://nodei.co/npm/types-installer/) [](https://travis-ci.org/nfour/types-installer)
# Types Installer
A CLI which updates and populates missing `@types/*` for your dependencies.
## Install
```bash
yarn global add types-installer
# or
npm i -g types-installer
# then
types-installer
```
Or locally:
```bash
yarn add types-installer
# then
yarn types-installer
```
## CLI
```
Usage: types-installer [options] [command]
Commands:
- interactive
- install [options] [dependency]
-s, --selection devDependencies, dependencies or all
-D, --toDev Save all types to devDependencies
-p, --packageManager Choose a package manager: npm, yarn or pnpm
```
#### Interactive
```bash
% types-installer
? Install options: all
? Install @types/* to devDependencies? Yes
? Which package manager? yarn
Installing all @type dependencies...
? select jest (Installed), ts-jest , ts-node , tslint , tslint-eslint-rules , typescript , chalk , commander (Installed), execa , inquirer
@types/tslint not found or failed to install
@types/chalk found
success Saved 1 new dependency.
└─ @types/chalk@0.4.31
```
#### Non-Interactive
```bash
% types-installer install
Installing all @type dependencies...
@types/tslint not found or failed to install
@types/chalk found
success Saved 1 new dependency.
└─ @types/chalk@0.4.31
```
```bash
% types-installer install chalk
Installing dependency chalk @types
@types/chalk found
success Saved 1 new dependency.
└─ @types/chalk@0.4.31
```
- `types-installer --help` for more options
## Behavior
- Types are by default saved to `dependencies` or `devDependencies`, wherever the dependency exists.
- To force everything top be saved into `devDependencies`, add the `--toDev` flag.