Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tokilabs/autotypes
Automatically add TypeScript typings to your project
https://github.com/tokilabs/autotypes
Last synced: about 1 month ago
JSON representation
Automatically add TypeScript typings to your project
- Host: GitHub
- URL: https://github.com/tokilabs/autotypes
- Owner: tokilabs
- License: mit
- Created: 2017-04-25T19:24:35.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-04-27T21:24:07.000Z (over 7 years ago)
- Last Synced: 2024-10-07T02:36:36.576Z (3 months ago)
- Language: JavaScript
- Size: 22.5 KB
- Stars: 3
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AutoTypes tool
A reaaaaally simple tool to perform an otherwise manual task: checking if there are typings in the @types npm organization and adding them to your project.
## How to use it
1. Install globally
yarn global add autotypes
or
npm i -g autotypes
2. Go to your project root and run
$ autotypes
> **NOTE:** it will install ALL types found. No questions asked!
You can also pass the path to a project or a `package.json`. But keep in mind that `yarn` will **ALWAYS** be run from the folder where the package.json is.
## Pro Tip
In a typescript project, everytime you install a new package, you need to check if types exist in that package. You can combine `autotypes` with that command to automatically install types if they exist, e.g.:
yarn add --dev mocha && autotypes
ornpm i --save-dev mocha && autotypes