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

@vte-js/playground

v1.1.1

Published

Visual debugging playground for Vue Token Engine

Readme

@vte-js/playground

Vue Token Engine 的可视化调试工具,根据项目的 design-tokens.ts 自动生成 playground。

功能

  • 自动生成:根据项目 tokens 动态生成 playground
  • 暗黑模式:支持亮色/暗色主题切换
  • Token 编辑器:实时查看 CSS 变量和值
  • 自动补全:输入 token 路径时自动过滤
  • 复制功能:一键复制 token 路径和 CSS 变量
  • 分类展示:颜色、间距、字号、圆角、阴影自动分组

使用

安装

npm install @vte-js/playground
# 或
pnpm add @vte-js/playground

生成 Playground

# 在项目根目录执行
vte-playground generate

# 或使用 pnpm
pnpm --filter @vte-js/playground exec vte-playground generate

# 指定 token 文件
vte-playground generate --token-file src/tokens.ts

# 指定输出目录
vte-playground generate --output .my-playground

启动 Playground

cd .vte-playground
pnpm install
pnpm dev

生成的文件

.vte-playground/
├── Playground.vue     # 自动生成的 playground 组件
├── main.ts            # 入口文件
├── index.html         # HTML 入口
├── vite.config.ts     # Vite 配置(自动指向项目 token 文件)
└── package.json       # 依赖配置

功能演示

1. Token 分类展示

根据 token 类型自动分组:

  • 🎨 颜色(color)
  • 📐 间距(spacing)
  • 📝 字号(fontSize)
  • 🔲 圆角(borderRadius)
  • 🌫️ 阴影(shadow)

2. Token 编辑器

输入 token 路径实时查看:

  • CSS Variable 格式
  • 原始值
  • 颜色预览(仅颜色 token)

3. 暗黑模式

点击 Header 右侧的 🌙/☀️ 按钮切换主题。

4. 复制功能

点击 Token Path、CSS Variable 或 Value 行,或点击 📋 按钮复制。

CLI 命令

# 生成 playground
vte-playground generate [token-file] [options]

# 选项
#   -o, --output <dir>    输出目录(默认 .vte-playground)

配置

生成的 vite.config.ts 会自动配置:

  • token 文件路径(相对路径)
  • Vue 插件
  • VTE 插件

如需自定义,编辑生成的文件即可。

License

ISC