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

poc-design-system-test

v1.0.1

Published

POC simples de design system

Readme

poc-design-system-test

npm version License: MIT

This project is a Proof of Concept (POC) of a simple Design System distributed via npm.

The main goal is to demonstrate in practice:

  • creating an npm package
  • basic design system structure (tokens + components)
  • build process using dist
  • distribution and consumption in another project

Table of Contents

  • Objective
  • Project structure
  • Concepts used
  • Get started
  • Build and test
  • Publishing
  • Usage in a consumer project
  • Next steps
  • References
  • License

Objective

This POC simulates a real-world scenario where a team needs to:

  • centralize styles and components
  • reuse code across projects
  • distribute via npm

Even though it is simple, it already follows basic Design System concepts.

Project structure

poc-npm-package/
├── src/
│   ├── components/
│   │   └── Button/
│   │       └── Button.js
│   ├── tokens/
│   │   └── colors.js
│   └── index.js
├── dist/
├── test.js
├── package.json
├── README.md
└── .gitignore

Folder explanation

| Folder | Purpose | | ----------------- | ----------------------------------- | | src/ | Design system source code | | src/components/ | Reusable components (e.g. Button) | | src/tokens/ | Design tokens (e.g. colors) | | src/index.js | Central export file | | dist/ | Final build output for distribution | | test.js | File to test the package |


Concepts used

npm Package

The project is distributed as an npm public package and can be installed in other projects.

Tokens

The colors.js file defines reusable color values:

const colors = {
  primary: "#cc092f"
}

Avoids duplication and centralizes design decisions.

Components

Example: Button

function Button(label) {
  return `<button>${label}</button>`
}

Represents a reusable UI element in the design system.

Central export

File: src/index.js

module.exports = {
  Button,
  colors
}

Allows importing everything from a single entry point.

Build (dist)

The src code is copied to dist, which is the version that gets published.

Get started

Clone the project

git clone <repo>
cd poc-npm-package

Install dependencies

npm install

Build and test

Generate build

npm run build

Copies src to dist.

Run test

node test.js

Example output:

token primary: #cc092f
<button>click here</button>

Publishing

Bump version

npm version patch

Build again

npm run build

Publish package

npm publish

Usage in a consumer project

Install package

npm install poc-design-system-test

Use in code

const { Button, colors } = require("poc-design-system-test")

console.log(colors.primary)
console.log(Button("buy now"))

Development flow

src → build → dist → test → publish → consume

Repository

https://github.com/lhenriquei/poc-design-system-test

Package

https://www.npmjs.com/package/poc-design-system-test

References