Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

auto-type-dep

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

auto-type-dep

a command to automatically fill up the @types corresponding to the dependency when you install a dependency

  • 1.7.0
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

auto-type-dep

在平时用TypeScript开发项目时,如果我们安装一个包的同时没有把改包对应的@types装上的话,在导入的时候编辑器会发出警告,如果用npm或者yarn同时安装的话,又会安装在dependencies下面,逼死强迫症的节奏啊,所以就有了auto-type-dep,一键安装某个包和它的@types,分别安装在dependenciesdevDependencies下面,使用起来也非常简单。

auto-type-dep会自动从全局的.npmrc中读取配置的镜像, 默认使用淘宝npm源来安装依赖。

usage
  • [sudo] npm install auto-type-dep -gauto-type-dep安装成全局模块

  • auto-type-dep add <pkg1>[@version] <pkg2>[@version] <pkg3>[@version] [option] 安装(多个)npm包

    安装相应的模块以及@types,如果在没有指定-n的情况下,判断项目中有没有yarn.lock文件,如果存在,就使用yarn安装,否则使用npm安装 @x.y.z可以指定具体版本号, 否则默认安装最新版本

    参数简写作用
    --npm-n指定用npm进行安装
    --yarn-y指定用yarn进行安装
    --js-js指定当前项目是一个javascript项目,不需要安装对应的@types
  • auto-type-dep remove <pkg1> <pkg2> <pkg3> 卸载(多个)npm包

    卸载相应的模块以及@types,首先会判断项目中有没有yarn.lock文件,如果存在,就使用 yarn卸载,否则使用npm卸载

Keywords

FAQs

Package last updated on 09 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc