npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

auto-type-dep

v1.7.1

Published

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

Downloads

5

Readme

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卸载