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

@buildit/gravity-particles

v1.0.0

Published

Design token data and common assets used by other Gravity libraries and tools.

Downloads

28

Readme

Buildit Gravity Particles

Gravity Particles banner

This is the "single source of truth" for design tokens and assets used throughout Buildit's Gravity design system.

Consuming exported design tokens (via NPM)

Exports of the design tokens in various formats are published as an NPM package: @buildit/gravity-particles.

Setup

Add the NPM package as a dependency (or dev dependency) to your project:

npm install --save @buildit/gravity-particles

Usage: JavaScript / TypeScript

The design tokens can be consumed in JavaScript (Node.js) applications. TypeScript type declarations are also published.

In your code, you can require and use the tokens like so:

const gravityParticles = require('@buildit/gravity-particles');

Usage: SASS

The design tokens are also published as SASS variables.

We recommend using Eyeglass SASS to simplify importing this library into your SASS code. Follow Eyeglass's instructions to integrate it with your SASS compilation options.

Once setup, you can @import them into your SASS code like so:

@import 'gravity-particles';

Development

Setup

  1. Clone this repo to your machine
  2. Run npm install to install the dependencies

Congrats, you're all set!

TIP: We recommend using NVM to ensure you have a compatible Node.js version (>= 8.11.1).

Commits

⚠️Important: All commits must adhere to the Coventional Commits format, because we have an automated release process that depends on this.

While you can, in principle, manually format your commit messages using your preferred git client, we recommend using commitizen, which is installed when you run npm install. To run it, simply do:

npm run commit

Note, we also use a git pre-commit hook (which is setup automatically when you run npm install) to lint new commit messages and enforce the correct formatting. Our CI also checks commit messages in a PR.

Build

To do a build, which exports the tokens in all the supported formats, run:

npm run build

This will create a dist/ directory containing the exported tokens. (It will also create a .tmp/ directory for intermediate build files)

Running tests

npm run test

Clean

To remove any previous build output run:

npm run clean

When running on macOS, the build process will download some additional tools on the first build and place them under .tmp-bin/. If you wish, you can remove those (e.g. to force a fresh download on the next build) by running: npm run clean-bin.

How it works

The design tokens are expressed in JSON files under src/tokens/. We use Amazon's Style Dictionary to export them in various formats.

The configuration, along with some Style Dictionary customisations, are kept under build-scripts/.

Finally, we use Gulp as our task runner to run Style Dictionary and perform other operations needed for the build.