All Projects → jeffijoe → Typesync

jeffijoe / Typesync

Licence: mit
Install missing TypeScript typings for dependencies in your package.json.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Typesync

Rescript React Navigation
ReScript bindings for React Navigation
Stars: ✭ 54 (-95%)
Mutual labels:  hacktoberfest
Maven Site
Apache Maven site
Stars: ✭ 54 (-95%)
Mutual labels:  hacktoberfest
Githubapi
Swift implementation of Github REST API v3
Stars: ✭ 55 (-94.91%)
Mutual labels:  hacktoberfest
Gg
A tool to manage multiple git repositories
Stars: ✭ 54 (-95%)
Mutual labels:  hacktoberfest
Systemctl Php
PHP wrapper for systemctl
Stars: ✭ 54 (-95%)
Mutual labels:  hacktoberfest
Goldiloader
Just the right amount of Rails eager loading
Stars: ✭ 1,074 (-0.56%)
Mutual labels:  hacktoberfest
Sanity Typed Queries
A typed, zero-dependency schema generator and query builder for Sanity.
Stars: ✭ 54 (-95%)
Mutual labels:  hacktoberfest
Os Autoinst Distri Opensuse
os-autoinst test cases for openSUSE
Stars: ✭ 55 (-94.91%)
Mutual labels:  hacktoberfest
Puppet Filebeat
Stars: ✭ 54 (-95%)
Mutual labels:  hacktoberfest
Vue Sweetalert Icons
🎨 Clean animated status icons for your Vue project. Based on SweetAlert's status icons
Stars: ✭ 55 (-94.91%)
Mutual labels:  hacktoberfest
Awesome Emoji Picker
Add-on/WebExtension that provides a modern emoji picker that you can use to find and copy/insert emoji into the active web page.
Stars: ✭ 54 (-95%)
Mutual labels:  hacktoberfest
Aws Iot Device Sdk Cpp V2
Next generation AWS IoT Client SDK for C++ using the AWS Common Runtime
Stars: ✭ 53 (-95.09%)
Mutual labels:  hacktoberfest
Settingsguide
More extensive explanations of Cura slicing settings.
Stars: ✭ 55 (-94.91%)
Mutual labels:  hacktoberfest
Nestjs Redoc
📘 ReDoc frontend for you NestJS swagger API documentation
Stars: ✭ 54 (-95%)
Mutual labels:  hacktoberfest
Ember Api Docs
Ember API Docs viewer
Stars: ✭ 55 (-94.91%)
Mutual labels:  hacktoberfest
Animoji
Describe your favorite anime with emoji ✨
Stars: ✭ 54 (-95%)
Mutual labels:  hacktoberfest
Okadash
Simple and Highly Customizable Dashboard tool made with Electron
Stars: ✭ 55 (-94.91%)
Mutual labels:  hacktoberfest
Multiverse Inventories
Stars: ✭ 55 (-94.91%)
Mutual labels:  hacktoberfest
Hackerqueue
Your favorite tech sites compiled down to topics you find interesting.
Stars: ✭ 55 (-94.91%)
Mutual labels:  hacktoberfest
Asciidoctor Kroki
Asciidoctor.js extension to convert diagrams to images using Kroki!
Stars: ✭ 55 (-94.91%)
Mutual labels:  hacktoberfest

typesync

Install missing TypeScript typings for dependencies in your package.json.

npm dependency Status devDependency Status Build Status Coveralls npm npm node

TypeSync

Install

npm install -g typesync

You can also use it directly with npx which will install it for you:

npx typesync

Usage

typesync [path/to/package.json] [--dry]

Path is relative to the current working directory. If omitted, defaults to package.json.

Note: typesync only modifies your package.json - you still need to run npm install, or — if drinking the k00laid — yarn.

--dry

If --dry is specified, will not actually write to the file, it only prints added typings,

--ignoredeps

To ignore certain sections, you can use the --ignoredeps= flag. For example, to ignore devDependencies, use --ignoredeps=dev. To ignore multiple, comma-separate them, like this: --ignoredeps=deps,peer (ignores dependencies and peerDependencies).

  • --ignoredeps=deps — ignores dependencies
  • --ignoredeps=dev — ignores devDependencies
  • --ignoredeps=peer — ignores peerDependencies
  • --ignoredeps=optional — ignores optionalDependencies

--ignorepackages

To ignore certain packages, you can use the --ignorepackages= flag. For example, to ignore nodemon, use --ignorepackages=nodemon. To ignore multiple, comma-separate them, like this: --ignorepackages=nodemon,whatever (ignores nodemon and whatever).

Use config file

Alternatively, you can use a TypeSync config file: .typesyncrc or a "typesync" section in your package.json. TypeSync will automatically search for configuration files. See cosmiconfig for details.

// .typesyncrc
{
  "ignoreDeps": ["dev"],
  "ignorePackages": ["nodemon"]
}

Run TypeSync Automatically After Every Install

To run TypeSync and install packages automatically after every package install, create a file called install-with-types.sh with the following content:

npm install $1
npx typesync
npm install

If you use yarn, use this instead:

yarn add $1
yarn typesync
yarn

Run this command to make the file executable:

chmod +x install-with-types.sh

Add the following to package.json:

{
  "scripts": {
    "i": "./install-with-types.sh"
  }
}

Then install packages like this:

npm run i <pkg name>

# Or, with yarn:
yarn i <pkg name>

Typings packages

TypeSync will add typings for packages that:

  • have a @types/package available
  • don't already provide typings internally (the typings and types field in package.json)

TypeSync will try to respect semver parity for the code and typings packages, and will fall back to the latest available typings package.

If you use a Semver ^ or ~ for a package, the same prefix will be used for the typings package. If you pin to an exact version ("some-package": "1.2.3"), no prefix will be written.

If a typings package in your package.json is not used (has no corresponding code package in your package.json and does not contribute to the global namespace), TypeSync will automatically remove it.

Monorepos

TypeSync added support for monorepos in v0.4.0. It will look at packages/workspaces globs in package.json and sync every matching file in one fell swoop.

Why?

Installing typings manually sucks. Flow has flow-typed which installs type definitions by looking at a package.json, which would be cool to have for TypeScript. Now we do!

Changelog

See CHANGELOG.md

Author

Jeff Hansen - @Jeffijoe

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].