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 🙏

© 2024 – Pkg Stats / Ryan Hefner

design-tokens-utils

v1.0.29

Published

Design Tokens Utils aims to provide a series of common utilities at the start of any web project, which will make it easier and faster to start the architecture.

Downloads

723

Readme

Design Tokens Utils

Design Tokens Utils aims to provide a series of common utilities at the start of any web project, which will make it easier and faster to start the architecture.

Installation

npm install design-tokens-utils -D

Example

design-tokens-utils --tokens=.frontech.json --path=assets --disableIconFont --disableIconSprites

Options flags command line:

| Flags | Description | | ------------------ | -------------------------------------------------------------------------------------------------------------- | | tokens | File Configuration Tokens | | theme | Set of tokens specific to the configuration file. Otherwise, it will select all those defined in the metadata. | | platforms | Style dictionary config to other plataforms. | | path | Path to build architecture. | | disableIconFont | Variable to don´t create icon font. By Default its created. | | disableIconSprites | Variable to don´t create icon sprites. By Default its created. | | fontNameIcons | Variable to define font family name icon. | | disableIconsFigma | Variable to don´t import icons figma. By Default its created. | | disableUtils | Variable to don´t create utils icon figma. By Default its created. |

For the proper functioning of the library, it is necessary to create a configuration file in the project. This configuration must maintain Tokens Studio Figma structure:

{
  "_icons": {
      "ds": {
        "icon": {
          "close": {
            "value": "https://www.figma.com/file/OydaDnZc16mulAMyxZcsMJ/%5Bexample<%5D-_icons?node-id=47-2299&t=SwiaYNlv9zVpdq6i-4",
            "type": "asset"
          }
        }
      }
  },
  "_palette-brand-example": {
      "color": {
        "white": {
          "value": "#ffffff",
          "type": "color"
        },
              "black": {
        "value": "#0A0A0A",
        "type": "color"
      },
        "gray": {
          "50": {
            "value": "#f6f6f6",
            "type": "color"
          },
          "100": {
            "value": "#e8e8e8",
            "type": "color"
          },
          "200": {
            "value": "#d9d9d9",
            "type": "color"
          },
          "300": {
            "value": "#bfbfbf",
            "type": "color"
          },
          "400": {
            "value": "#a6a6a6",
            "type": "color"
          },
          "500": {
            "value": "#8c8c8c",
            "type": "color"
          },
          "600": {
            "value": "#737373",
            "type": "color"
          },
          "700": {
            "value": "#4D4D4D",
            "type": "color"
          },
          "800": {
            "value": "#373737",
            "type": "color"
          },
          "900": {
            "value": "#1C1C1C",
            "type": "color"
          }
        },
    }
  },
  "$themes": [],
  "$metadata": {
    "tokenSetOrder": [
      "_palette-brand-example",
      "_icons",
    ]
  }
}