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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@zswurun/components

v0.0.75

Published

```bash yarn add @zswurun/components ```

Readme

安装

yarn add @zswurun/components

样式

// main.ts
import '@yr/components/dist/style.css'

手动全局注册

// main.ts
import { ResizeTable, ConfigProvider } from '@yr/components'

app.component(ResizeTable.name, ResizeTable)
app.component(ConfigProvider.name, ConfigProvider)

使用 unplugin-vue-components 自动引入,添加配置

// vite.config.ts
import Components from 'unplugin-vue-components/vite'

{
  plugins: {
    Components({
      resolvers: [
        (componentName) => {
          const compoentsName = ['ResizeTable', 'ConfigProvider', 'AModalPro']
          if (
            componentName.startsWith('Y') &&
            compoentsName.includes(componentName.slice(1))
          ) {
            return {
              name: componentName.slice(1),
              from: '@yr/components',
            }
          }
        },
      ],
    })
  }
}

Git 提交日志

yarn commit

目录结构

├─.commitlintrc.json 
├─.editorconfig 
├─.eslintignore 
├─.eslintrc.json 
├─.gitignore 
├─.prettierignore 
├─.prettierrc.json 
├─docs 
│ ├─changelog.md 
│ ├─components 
│ │ └─resize-table.md 
│ ├─getting-started.md 
│ └─index.md 
├─index.html 
├─package.json 
├─public 
├─README.md 
├─script 
│ └─type.cjs 
├─src 
│ ├─App.vue 
│ ├─assets 
│ ├─components.d.ts 
│ ├─lib                       // 组件目录
│ │ ├─config-rovider         // 全局配置组件,跟 ant-design-vue 的类似
│ │ │ ├─config-rovider.vue 
│ │ │ └─index.ts 
│ │ ├─index.ts               // 所有组件入口
│ │ ├─modal                  // 弹窗组件
│ │ │ ├─index.ts 
│ │ │ └─modal.vue 
│ │ └─resize-table           // 表格组件
│ │   ├─index.ts 
│ │   ├─resize-table.vue 
│ │   └─utils.ts 
│ ├─locale                    // 导出的多语言文本
│ │ ├─default.ts 
│ │ ├─en-US.ts 
│ │ ├─index.ts 
│ │ └─zh-CN.ts 
│ ├─main.ts                   // 测试例子页面入口
│ ├─style.css 
│ ├─utils                     // 工具
│ │ └─withInstall.ts         // 辅助注册组件方法
│ └─vite-env.d.ts 
├─tsconfig.json 
├─tsconfig.node.json 
├─vite.config.ts 
└─yarn.lock 

组件文档

yarn docs:dev

执行上方命令可查看对应文档(具体与实际代码配置为准)。

如何添加新组件?

  1. src\lib 目录下新建一个组件目录,必须有一个 index.ts 文件为入口文件。
  2. 编写好组件后,在组件目录下的 index.ts 文件引入并导出。
  3. src\lib\index.ts 添加已创建的组件。

如何测试组件?

src\main.ts 文件引入对应组件,然后在 src\App.vue 编写组件测试预览代码即可。