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

life-design-system-tokens

v1.0.2

Published

Life Design System Tokens

Readme

Life Design System Tokens

本仓库提供 Life Design System 的核心 Design Tokens (CSS Variables)。通过本 npm 包,前端研发可以将同一套设计规范(色值、圆角、字号等)轻松集成到各自的 Web 项目中,并与 Figma 的设计产物保持一致。

📦 接入方:如何一键引入

本包已发布在公共的 npm 仓库中,无需任何额外配置,直接安装即可。

1. 安装依赖

使用 npm、yarn 或 pnpm 安装该 Token 包:

npm install life-design-system-tokens
# 或
yarn add life-design-system-tokens
# 或
pnpm add life-design-system-tokens

2. 在项目中引入

在您的入口文件(如 main.js, App.vue 或全局 CSS)中引入 tokens:

// JavaScript / TypeScript (Webpack/Vite/Vite等现代构建工具) 引入
import 'life-design-system-tokens';

// 如果需要显式引入具体的 css 文件:
import 'life-design-system-tokens/tokens.css';

如果在纯 CSS 中引入:

@import 'life-design-system-tokens';

之后,您就可以在任意组件的样式中直接使用定义好的 CSS 变量(如 var(--primary-color-normal)var(--radius-m) 等)来实现业务 UI 了。


🚀 维护方:如何更新与发布

当 Figma 中的设计规范发生变更,本仓库通过 npm run sync-tokens 更新了 life-design-system-tokens.css 后,您可以按照以下简单的步骤将新版本发布给其他团队成员使用:

1. 登录 npm

首次发布前,确保您已在终端中登录了 npm 账号:

npm login

2. 更新版本号

根据改动的内容,通过 npm 内置命令更新版本号(该命令会自动修改 package.json 中的 version 字段,并创建一个 Git Tag):

npm version patch # 用于修复 bug、微调色值(例如:1.0.0 -> 1.0.1)
npm version minor # 用于新增 Token(例如:1.0.1 -> 1.1.0)
npm version major # 用于破坏性更新,如删除 Token 或大规模重命名(例如:1.1.0 -> 2.0.0)

3. 一键发布

运行发布命令即可推送到 npmjs.com:

npm publish

发布成功后,将代码推送到 GitHub 保存源码即可:

git push --follow-tags

其他研发同学只需在其项目中执行 npm update life-design-system-tokens,即可无缝获取最新的样式规范。