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

card-layout-miniprogram

v0.1.0

Published

卡片布局相关的小程序组件库

Readme

card-layout-miniprogram

一个参考 tdesign-miniprogram 目录结构的卡片组件库。可在本仓库直接调试,也可通过 npm 发布供其它小程序引用。

目录结构

card-layout-miniprogram/
├── miniprogram/                # 组件源码(发布产物)
│   ├── components/
│   │   └── card-tag/           # 示例组件
│   └── app.json/app.js/...     # 直接在目录下调试需要的最小工程
├── example/                    # 引用组件库的示例小程序,方便本地测试
├── types/                      # 类型声明
├── package.json
├── tsconfig.json
└── README.md

本地开发

  1. pnpm install 安装依赖。
  2. miniprogram/components 下新增组件(参考 card-tag)。逻辑写在 .ts 中,运行 pnpm run build 编译为 .js
  3. 直接使用 微信开发者工具 打开 packages/card-layout-miniprogram/miniprogrampackages/card-layout-miniprogram/example 目录,即可预览组件。

npm 发布流程

  1. 更新 package.jsonversion 等信息。
  2. 执行 pnpm run clean && pnpm run build,确保产物最新。
  3. npm login(如未登录),然后 npm publish --access public
  4. 业务小程序中 npm install card-layout-miniprogram 后,在页面 usingComponents 中引用:
{
  "usingComponents": {
    "card-tag": "card-layout-miniprogram/miniprogram/components/card-tag/card-tag"
  }
}

构建 npm 后即可在 WXML 使用 <card-tag text="重要" />

示例组件:card-tag

用于在卡片上展示状态或标签,提供 textthemeround 三个属性,可按需扩展其它组件。