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

react-lib-starter-test2

v0.2.0

Published

This project provides a boilerplate to help you create and publish reusable React components to npm. It is built with following tools to ensure an efficient development experience.

Downloads

2

Readme

React Lib Starter

This project provides a boilerplate to help you create and publish reusable React components to npm. It is built with following tools to ensure an efficient development experience.

Features

  • Vite: Fast development and optimized bundling for your component library.
  • Tailwind CSS: Utility-first CSS framework for rapidly building custom designs.
  • pnpm: Efficient package management with improved performance and disk space usage.
  • TypeScript: Static typing for better code quality and maintainability.
  • Commitizen: Standardized commit messages for better collaboration.
  • GitHub Actions: Automated Continuous Integration and Deployment.
  • Release Please: Automated semantic versioning and release management through Pull Requests.

Prerequisites

Note:

  1. The consumer of your npm package will need to have TailwindCSS installed in their project.
  2. This project supports css modules. So, you can use *.module.css files to style your components. To import modules into your components you have to generate types for css modules. To easily generate the typ definitions, you can use typed-css-modules package.

Getting Started

To start using this boilerplate and manually release, follow these steps:

  1. Clone this repository:

    git clone https://github.com/ByteMeBaby/react-lib-starter.git
  2. Install dependencies using pnpm:

    pnpm install
  3. Start the development server:

    pnpm dev

To manually release a new version of your component library, follow these steps:

  1. Build the library for production:

    pnpm build
  2. Publish the library to npm:

     pnpm publish

Auto Releasing with Release Please

This project uses Release Please for semantic release. To release a new version of your component library, follow these steps:

Setting up environment

  1. Copy the content of github to .github.
  2. Create a new GitHub token as GITHUB_TOKEN with the repo scope.
  3. In repository settings -> Actions -> General -> workflow permissions, Allow github actions to create and approve pull requests.
  4. Create a new NPM token as NPM_TOKEN and put it under your repository secrets.
  5. You can change the release workflow in .github/workflows/release.yml file.

How to semantically release

This is a commitizen friendly project. So, you can use pnpm commit to commit your changes. It will automatically generate a commit message for you. When you merge your changes into the main branch, Release Please will automatically create a release PR for you, based on the commit messages.

  1. Create a new branch for your changes: git checkout -b feature/your-feature.
  2. Make your changes and commit them using Commitizen: pnpm commit.
  3. Push your changes to your fork and create a Pull Request.
  4. The Release Please GitHub Action will automatically create a release PR when new changes are merged into the main branch.
  5. Review the release PR and merge it to create a new release.

Contributing

  1. Fork this repository and clone it to your local machine.
  2. Install dependencies: pnpm install.
  3. Create a new branch for your changes: git checkout -b feature/your-feature.
  4. To ensure all the githooks are instakked run pnpm husky install. This should enable Commitizen for git commit.
  5. Push your changes to your branch and create a Pull Request to main branch.

License

This repository offers its contents without any warranty or guarantee of its accuracy or reliability. Users are advised to use the materials at their own risk.

The project is licensed under MIT License. For a detailed understanding of the terms and conditions, please refer to the LICENSE file within the repository.