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

@shwfed/config

v3.0.13

Published

Configurable UI for SHWFED

Readme

@shwfed/nuxt

阅读下面的资料以确保你理解这个项目

目录结构

参考 Nuxt Module 规范,暴露接口查看 module.ts

Block 模式

  • 宿主(如 table 列、actions 按钮)通过在 <host>/<kind>/<compatibilityDate>/<type>/ 下放置包含 schema.tsconfig.vueruntime.vue 的文件夹来扩展。
  • 区分字段为 type(列和按钮统一),版本通过 compatibilityDate 管理。
  • 同目录下的 utils/resolve.ts 使用 eager import.meta.glob 构建注册表;若模块的 typecompatibilityDate 与文件夹名不匹配,模块加载时会抛错。
  • 调用处保留领域命名——ColumnButtonfindColumnfindButtonCOLUMNSBUTTONS。"Block" 仅作为该模式的名称。
  • 新增时请严格照搬现有目录结构。

双轴测试

  • Per-folder 测试schema.test.tsconfig.test.tsruntime.test.ts)与实现代码放在同一目录。
    • 直接 import ./schema 和 SFC;通过 vi.mock 打桩 #appinjectCELContext、以及宿主 UI 原子组件。
    • 禁止触达 utils/resolve.ts——import.meta.glob 和 Nuxt 不在测试范围内。
    • 使用纯 vitest + @vue/test-utils
    • 由于 config/runtime SFC 会间接 import actions/schema.ts(后者会 import utils/resolve),通常也需要 vi.mock('../../../schema', …) 切断这条依赖链。
    • #appvitest.config.mjs 中被 alias 到 test/stubs/nuxt-app.ts;需要 useNuxtApp 时在单个测试中用 vi.mock('#app', …) 覆盖。
  • 集成测试位于 test/ 目录,使用 @nuxt/test-utils 搭配 test/fixtures/<surface>/ 下的 fixture。每个宿主一个 fixture——不要把多个宿主塞进同一个大 fixture。
  • 被要求为列/按钮加测试时,默认选 per-folder。只有测试宿主接线(配置翻译、贡献合并、端到端交互)时才使用 test/