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

@iclubs-packages/design-system

v1.0.53

Published

Coren design-system

Downloads

20

Readme

Used Technologies

This project was built with:

  • React

  • Typescript

  • Styled Components

  • Storybook

  • Vite

  • Vitest

  • React Testing Library

  • ESLint

  • Prettier

  • Plop.js

Usage

To use this design system library you must follow the following steps:

Install the dependencies

With yarn:

yarn add @iclubs-packages/design-system

With npm:

npm i @iclubs-packages/design-system

Next step you need implement the CoreProvider in your App.tsx:

export function App() {
  return (
      <CoreProvider>
        {/*Rest of your application*/}
      </CoreProvider>
  );
}

Import the components, containers and so on. And after, use it. For example:

import { Card } from "@iclubs-packages/design-system";

export function App() {
  return <Card>Hello README!</Card>;
}

Start Storybook

To start our Storybook is just run the following command:

yarn storybook

A node script will run and our design system documentation will be opened in your browser.

New component creation

We use Plop.js to padronize our component creation in the project.

To create a new component is just run the following command:

yarn new:component

That a node script with plop, again, will do all the job for you! 😉✨

Library build

To build the library you must run:

yarn build

Then the Vite will build the application and create the dist folder, containing the project build.

Library publishing

Publishing itself

First, you will have to change the project version in the package.json:

{
  "version": "1.0.0", // change to 1.0.1 e.g
  ...
}

After, you have to build the application.

And, finally, run:

yarn publish

Following the indicated steps. With that, a new version will be published in our npm.

Testing your publishable

After publishing a new version, you can test if your changes climb successfully to NPM. To do this, you can:

Go to the package.json of the lib itself and update the dev dependency "@iclubs-packages/design-system" to the version you just published.

{
  "devDependencies": {
    "@iclubs-packages/design-system": "^0.0.5", // change to 0.0.6 e.g
  },
  ...
}

After, you will run yarn to update the version of the library in the project.

With that, you be able to test your change on the src/TestingComponents.tsx page.

For example, if you added a new component in the design system you can import this component in this page and test if it appears on the screen.

Tests

Config

Our test coverage is 100% for:

  • Statements

  • Branches

  • Functions

  • And lines

Everything, basically.

Running Unit tests

To run the tests you have two options:

yarn test that runs the tests silencing the console outputs from the run.

yarn test

And yarn test-visible that runs the tests showing these console outputs.

yarn test-visible