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

figma-to-code-pipeline

v4.4.0

Published

Figma link normalization, local cache index, validation, and Node CLI (framework-agnostic core).

Downloads

583

Readme

figma-to-code-pipeline

figma-to-code-pipeline 面向业务项目,专注 Figma → 本地通用缓存 这一中间数据层,为后续设计与代码协同提供可校验、可复用的基础。默认采用「本地缓存优先 + 按需 MCP + 最小调用集 + 严格证据校验 + validate 闭环」;不绑定具体 UI 框架

面向:npm 接入的业务仓日常使用;克隆本仓库的开发者维护 CLI / 文档 / cursor-bootstrap

npm 发布由仓库维护者负责;普通用户无需执行 npm publish


npm 用户快速开始

npm i -D figma-to-code-pipeline
npx figma-cache cursor init    # 默认安全模式;覆盖模板用 --overwrite
npm run fc:init                 # 无 scripts 时用:npx figma-cache init
npm run fc:validate

接入后请在 Cursor 中 @AGENT-SETUP-PROMPT.md(由 cursor init 刷新)。cursor init 还会落地 figma-cache.config.jsAGENT-SETUP-PROMPT.md,并把同事指南拷到 figma-cache/docs/colleague-guide-zh.md

协作口径(极简):先查缓存 → 按需 MCP → mcp-raw/ 落证据 → npm run fc:mcp:ingest:quiet 一条龙(或等价 upsert/ensure + validate)。source=figma-mcp 时证据不全会失败。人类默认只读一份figma-cache/docs/README.md 「一页速查」;术语与可转发摘要见 figma-cache/docs/colleague-guide-zh.md

脚本全集、环境变量、flow、UI gate、预算、示例命令:见 figma-cache/docs/README.md(随 npm 包分发的主手册)。


本仓库维护者(cursor-bootstrap / CI)

业务项目一般只需上面的 cursor init不需要跑 sync。

  • 真源:cursor-bootstrap/;镜像:.cursor/(勿手改镜像)
  • 改规则后:npm run verify:cursor:syncnpm run verify:cursornpm test / prepack 已包含)

克隆本仓库

git clone https://github.com/907086379/figma-to-code-pipeline.git
cd figma-to-code-pipeline
npm ci
npm run verify:docs && npm test

提交前:README.mddocs/*.mdfigma-cache/docs/*.md 保持 UTF-8 无 BOM;改 CLI 请同步 figma-cache/docs/README.md / CHANGELOG.md

Windows 发 npm(硬链接 / 415)

NTFS 上,npm pack 可能把磁盘硬链接写进 tarball,registry 会拒绝(415 Hard link is not allowed)。本仓库在 prepack 中于 win32 执行 scripts/publish/materialize-pack-files.cjs,对即将打包的路径(package.json files 展开 + npm 自动纳入的根 README* / CHANGELOG* / LICENSE 等)做实体化。

  • 推荐发版npm run publish:win(清 stale .tgznpm packpack:check-tarballnpm publish
  • 仅验包npm packnpm run pack:check-tarball(需 tar -tvf 可用,如 Git for Windows / bsdtar)
  • 日常开发pnpm test 即可;发版 tarball 以 npm 为准prepack / publish:win),勿假定 pnpm pack 行为相同
  • 修改 package.jsonfiles 时,须同步维护 scripts/publish/expand-package-files.cjs 中的 glob 分支

其它注意:若根目录存在本地 README.owner.md.gitignore 已忽略),npm 可能按 README* 打入包;发版前可临时改名(避免以 README 开头)或移出根目录。


文档入口

| 场景 | 文件 | |------|------| | 升级 / 破坏性变更 | CHANGELOG.md | | 命令、一页速查、环境变量、流程、UI 工具链(主手册) | figma-cache/docs/README.md | | 团队摘要(术语、接入、转发) | figma-cache/docs/colleague-guide-zh.md | | 兼容旧书签(内容已并入主手册「一页速查」) | figma-cache/docs/quick-start-zh.md | | 链接 / flow 边类型规范 | figma-cache/docs/link-normalization-spec.mdflow-edge-taxonomy.md | | 接入任务书 | AGENT-SETUP-PROMPT.mdcursor init 刷新到业务根) | | 人读总览(治理、figma-flow-readme、移动端可选) | docs/README.mddocs/figma-flow-readme.md |