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

design-token-pipeline

v0.1.1

Published

Deterministic design token validation and CSS, TypeScript, and Tailwind generation.

Readme

design-token-pipeline

Один JSON source of truth для воспроизводимой генерации CSS, TypeScript и Tailwind theme.

design-token-pipeline проверяет design tokens, разрешает aliases и создаёт byte-identical artifacts. CLI не оставляет частично записанные файлы, а library API не пишет в console и не завершает process.

Быстрый старт

Требуются Node.js 24.18.0 или новее и npm 11.16.0 или новее.

npm install --save-dev design-token-pipeline
npx design-token-pipeline build tokens.json

По умолчанию команда создаёт generated/tokens.css, generated/tokens.ts и generated/tailwind-theme.ts.

Возможности

  • Проверяемая схема — JSON contract с $type, $value, $description и наследованием type от группы.
  • Безопасные aliases — ссылки {path.to.token}, проверка отсутствующих targets, type mismatch и cycles.
  • Три формата — CSS custom properties, типизированный TypeScript и theme.extend-совместимый Tailwind object.
  • Детерминированный output — стабильная сортировка, \n и одинаковые bytes при повторной сборке.
  • Atomic writes — validation или IO error не оставляет смешанный набор artifacts.
  • CI check mode--check находит stale, missing и unexpected outputs без записи.

Пример

{
  "color": {
    "$type": "color",
    "brand": {
      "primary": { "$value": "#2563eb" },
      "focus": { "$value": "{color.brand.primary}" }
    }
  },
  "spacing": {
    "$type": "dimension",
    "sm": { "$value": "0.5rem" }
  }
}
npx design-token-pipeline build tokens.json --out-dir generated --prefix brand
npx design-token-pipeline build tokens.json --out-dir generated --prefix brand --check

Готовый end-to-end вариант находится в examples/basic.

Library API

import { buildTokens, DEFAULT_CONFIG } from 'design-token-pipeline';

const jsonSource = JSON.stringify({
  color: {
    $type: 'color',
    primary: { $value: '#2563eb' },
  },
});
const result = buildTokens(jsonSource, DEFAULT_CONFIG, 'tokens.json');
if (!result.success) {
  console.error(result.diagnostics);
} else {
  console.log(result.value.artifacts.map((artifact) => artifact.filename));
}

API возвращает discriminated OperationResult<T> и typed diagnostics. Запись на filesystem выполняется только при явном вызове IO API.

Документация

| Руководство | Содержание | | ------------------------------------- | ----------------------------------------- | | CLI | Команды, options, logging и exit codes | | Конфигурация | JSON config, defaults и CLI overrides | | Форматы | Token schema, aliases и generated outputs | | Архитектура | Модули, data flow и security boundaries | | Поставка | CI, dependency baseline и release flow |

Также доступны правила участия, security policy, changelog и release notes.

Ограничения v0.1.0

Поддерживается документированный DTCG-inspired scalar subset. YAML, composite tokens, themes/modes, watch mode, remote sources и полная совместимость с DTCG не заявлены.

Лицензия

MIT