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 🙏

© 2025 – Pkg Stats / Ryan Hefner

cxw_eee_ts

v1.0.1

Published

for di-an web react npm dependencie develop bolerlpate

Readme

前言

由于项目拆分,需要将公用的组件单独拆分成一个个小的npm包,使之满足业务开发,应用多项目。

需求

  1. 目前数据层处理方案是 dva ,沿用dva方案去开发组件,但dva-cli该脚手架臃肿,默认生成方案是带完整路由 的产品,仅希望拥有dva核心数据处理,开发小的npm组件。

  2. 希望能支持javascript和typescript开发。

  3. 希望能拥有好的模块化,可以支持按需引入和整体模块导入例如:

    https://dian-lingxi.oss-cn-beijing.aliyuncs.com/2020-12-06/da2175ec5c83145823527d6e24bf3a6.png?Expires=1607246334&OSSAccessKeyId=LTAIiTOudd9oeHVo&Signature=iTdC%2FnE60%2FXZHJVWZ%2B89tCs6%2Bqg%3D

    该文件目录为npm包的开发目录,称为A,其中/dist 和 /lib是通过打包编译出来的文件夹。

​ 当A仅仅为组件不带其他功能。其他项目B中想直接引入A时:

import A from 'A/dist'

该方式 为全量引入。

当B中只想按需引入A中的某些功能:

import { func_a } from 'A'

实现