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

@goldencomm/baseline-tokens

v0.2.0

Published

Baseline design tokens and system icons: core tokens from the Figma export, lints, Style Dictionary build and icon generation for one platform (next | wordpress | shopify | html) with an optional client override.

Readme

@goldencomm/baseline-tokens

Core Baseline tokens (the Figma variable export, imported as DTCG), the lints, the Style Dictionary build to every platform output, and the system icon generator. Two ways to run it:

In this monorepo (core): npm run tokens:import after a plugin export; npm run tokens, npm run icons:build. Outputs are committed for every platform and gated by npm run check.

In a client project (one platform), via the CLI this package ships:

npx baseline-tokens build  --platform wordpress --out wp-content/themes/<theme> --client client.tokens.json
npx baseline-tokens icons  --platform wordpress --out wp-content/themes/<theme> --client client.tokens.json
npx baseline-tokens client from-defs --core-mode scheme-1=defs.json --core-mode scheme-2=defs2.json --out client.tokens.json

--out is the platform root: the Next/HTML folder that imports tokens.css, or the WordPress / Shopify theme folder. client.tokens.json holds value overrides keyed by core paths (<collection-slug>.<mode-slug> -> DTCG tree); a name core does not have is rejected (ADR-0001: a client theme is core with different values), except additions in Primitives folders that are never emitted (colors/* ramps, spacing/*), which a clone may add freely and the build ignores with a note (ADR-0027 §5). The lints spacing-derived, radius-derived and tailwind-frozen (against the installed tailwindcss) refuse hand-edited derived scales; regenerate them in the plugin's Scales panel. The Claude runbook that produces it from a client's Figma theme is .claude/skills/baseline-client-tokens/SKILL.md.

Code Connect for a client (ADR-0021: the client's Figma library is a clone of the Core file, so node ids are Core's and only the file key differs):

npx baseline-tokens code-connect --platform wordpress --out wp-content/themes/<theme> --figma-file <clone key or URL> --parse
npx baseline-tokens code-connect --platform wordpress --out wp-content/themes/<theme> --figma-file <clone key or URL> --publish   # CI only

Writes <root>/figma.config.json (label per platform, default include globs components/ui/** for Next, blocks/** + code-connect/** for WordPress, blocks/** for Shopify; override with --include <glob>), with documentUrlSubstitutions mapping Core's key to the clone's. --parse checks the templates, --dry-run validates against Figma (validation is on since ADR-0029), --publish publishes and refuses outside CI (CI unset) or without FIGMA_ACCESS_TOKEN. The Code Connect CLI runs from the platform root (its include globs resolve against the working directory), using the project's own @figma/code-connect when installed, otherwise npx. Re-run after every re-clone (new file key).

icons needs the client's active Iconify set installed in the project (npm i -D @iconify-json/<prefix>); the command names it. The other sets are optional peers (this repo installs all five to keep the vocabulary complete).

Files

| | | |---|---| | import.mjs | plugin export -> src/figma/<collection>.<mode>.json + manifest.json | | lint.mjs | shadcn set, naming/codeSyntax derivation (ADR-0012), component geometry rules (ADR-0017/0019) | | build.mjs | Style Dictionary -> registry CSS/cssVars, WordPress/HTML tokens.css, Shopify snippets + settings; copies typeset.css per platform (ADR-0028) | | typeset.css | Canonical Baseline fork of shadcn typeset (prose rhythm); platform copies are build outputs | | icons.mjs | vocabulary x active set -> React icon map, WordPress icon collection, Shopify snippet + block options, HTML sprite, Code Connect reverse maps | | cli.mjs | the per-platform orchestration above (scratch copy of core + client overrides -> generators -> copy out) | | test/run.mjs | fixture -> import -> lint -> build assertions, determinism, and a client-override CLI smoke |

Env for tests/CLI: TOKENS_SRC_DIR (token source), TOKENS_OUT_ROOT (monorepo-shaped output root), TOKENS_CLIENT=1 (client mode: resolved literals may replace core aliases).