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

subbiahjcp-design-tokens

v1.0.40

Published

Design tokens generated from Figma

Readme

Design Tokens App

Automated design tokens generation from Figma Token Studio using StyleDictionary.

Features

  • 🎨 W3C Design Tokens Format - Supports the latest design tokens specification
  • 🔄 Multi-Platform Output - Generates tokens for Web (JS/CSS) and React Native
  • 🚀 GitLab CI/CD - Automated build and deployment pipeline
  • 📦 NPM Publishing - Ready for package distribution
  • 🔗 Webhook Integration - Automatic builds from Figma Token Studio

Quick Start

Installation

npm install

Build Tokens

npm run build

Test Build

npm run test

Watch for Changes

npm run watch

Start Webhook Server

npm run serve

Project Structure

design-tokens-app/
├── tokens/
│   ├── tokens.json          # Source W3C design tokens
│   └── transformed.json     # StyleDictionary format
├── build/
│   ├── web/
│   │   ├── tokens.js        # JavaScript ES6 exports
│   │   └── tokens.css       # CSS custom properties
│   └── native/
│       └── tokens.js        # React Native tokens
├── scripts/
│   ├── build-tokens.js      # Main build script
│   ├── test-build.js        # Build verification
│   └── webhook-server.js    # Figma webhook server
└── .gitlab-ci.yml           # CI/CD configuration

Token Categories

  • Colors - Complete color palette with semantic naming
  • Spacing - Consistent spacing scale
  • Typography - Font families, sizes, weights, and line heights
  • Border Radius - Consistent corner radius values
  • Opacity - Standard opacity levels
  • Dimensions - Base dimension scale

Usage Examples

JavaScript/TypeScript

import { 
  ColorsBlue600, 
  SpacingMd, 
  FontSizesH1 
} from './build/web/tokens.js';

const button = {
  backgroundColor: ColorsBlue600,
  padding: SpacingMd,
  fontSize: FontSizesH1
};

CSS

@import './build/web/tokens.css';

.button {
  background-color: var(--colors-blue-600);
  padding: var(--spacing-md);
  font-size: var(--font-sizes-h1);
}

CI/CD Pipeline

The GitLab CI pipeline includes:

  1. Build Stage - Transforms tokens and generates output files
  2. Test Stage - Verifies build artifacts
  3. Publish Stage - (Commented) NPM package publishing
  4. Deploy Stage - (Commented) Vercel deployment trigger

Configuration

StyleDictionary Config

The build process uses StyleDictionary v3 with custom transforms for:

  • W3C token format conversion
  • Font weight mapping (Regular → 400, Bold → 700)
  • Reference resolution
  • Multi-platform output

Webhook Server

Configure the webhook server for Figma Token Studio integration:

// Set environment variables
WEBHOOK_PORT=3000
WEBHOOK_SECRET=your-secret-key

Troubleshooting

Build Issues

  1. Dependency conflicts: Use npm install --legacy-peer-deps if needed
  2. Missing build directory: The script automatically creates required directories
  3. Token references: Complex references may need manual resolution

Common Fixes

  • Ensure Node.js version 16+ is installed
  • Clear node_modules and reinstall if build fails
  • Check token syntax in tokens/tokens.json

Development

Adding New Tokens

  1. Update tokens/tokens.json with W3C format
  2. Run npm run build to generate outputs
  3. Test with npm run test

Modifying Build Process

Edit scripts/build-tokens.js to customize:

  • Token transformation logic
  • Output formats
  • Platform-specific builds

License

MIT License - see LICENSE file for details.

Support

For issues and questions:

  • Create an issue in the GitLab repository
  • Check the troubleshooting section above
  • Review StyleDictionary documentation