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

@kumar08/react-lib

v1.0.3

Published

<b>Create React component library using atomic design pattern for your Company with the power of <i>Typescript</i>, <i>Storybook</i> and <i>Github webhooks</i>. and document them with <i>jsDoc</i></b>. all in one place.

Downloads

3

Readme

Create React component library using atomic design pattern

Create React component library using atomic design pattern for your Company with the power of Typescript, Storybook and Github webhooks. and document them with jsDoc. all in one place.

By default everthing is exported from "src" as const. Change the index.ts file for the exports according to your convenience.

This project uses yalc for testing in other local project and Husky for git commit linting. If you dont want commit liniting you can remove .husky folder and the below mentioned script from package.json file or you can configure according to your need, using commitlint.config.js


...
"scripts":{
  "prepare": "husky install"
}
...

To start Follow the Following steps

Install yarn

Install via npm

npm install --global yarn

Install yalc globaly

yarn global add yalc

Install all dependencies

yarn install

To Add new component run the following cmd and follow the steps

yarn run create-component

ATOMS: Atoms are the smallest possible components, such as buttons, titles, inputs, text. Atoms of our interfaces serve as the foundational building blocks of our components and can’t be broken down any further without ceasing to be functional.

Molecules: Molecules as they are named consist of two or more atoms, molecules are relatively simple groups of UI elements functioning together as a unit. Examples are A Textfield comprising of an HTML textInput, a label, and an error message or a search Box comprising of an HTML TextInput and a Button.

Organisms: Organisms are relatively complex UI components composed of groups of molecules and/or atoms and/or other organisms. These organisms form distinct sections of an interface.

For running storybook

yarn run storybbok

Run the below CMD to build JSDoc on save changes

yarn run watch:jsDoc

Docker-compose(slow)

For building storybook and jsdoc image we are using storyDockerfile and jsdocDockerfile.

For storybook and jsDoc documentation

docker-compose up

Publishing

For Publishing using github webhooks we need NPM Automation token Access Token.

  • To Generate NPM Access token.

  • Change the name,homepage,author in package.json.

  • Create a NPM Account and create a access token< Automation > (save the token somewhere for github actions secrets).

  • Create a repo on github.

  • Push to github.

    You can go to the actions tab inside the repo for git webhooks in action.

  • Go to settings of the Repo.

  • Under Security > Secrets click on Action and add a new repo secret NPM_TOKEN

Note: To trigger publish githook we need to create a new Release and publish it. As soon as you publish it will start doing all the steps mentioned in .github/publish.yaml

Note for devlopment(using: yalc)

When using yalc, Add "postyalc" into package.json. To avoid module not found (it will not add anything inside the package.json file if the yalc project ( < my-package > ) has dependencies).

...
  "scripts":{
    ...
    "postyalc": "yarn"
    ...
  }
...

To automatically install local pacakage dependencies as yalc does not out of the box install or run yarn/npm install after yalc add < my-package >.

When using yalc link in consumer/other project folder it will not touch package.json file and node_modules folder. You will have to import the local package installed with yalc from .yalc in the root_dir. And there will be no effect postyalc script.

If you want you can put pre-commit and pre-push actions in their respective files to trigger.

To Commit to git we have to follow a convention

Note: No need to follow this if not using husky

git commit -m '<prefix>: implement commitlint'

Prefix:[
        "build",
        "chore",
        "ci",
        "docs",
        "feat",
        "fix",
        "perf",
        "refactor",
        "revert",
        "style",
        "test",
        "translation",
        "security",
        "changeset",
        "patch_version"
      ],

To know more about prefix checkout commitlint.config.js