Create Component Lib screenshot

Create Component Lib

Author Avatar Theme by Aakashns
Updated: 18 Dec 2018
89 Stars

Create a library of React components that can be published to npm

Categories

Overview

create-component-lib is a library that allows developers to create and publish a collection of React components to npm. It is built on top of create-react-app and is currently tested on Linux and Mac operating systems. The library is essentially a shell script and welcomes contributions from the community.

Features

  • Create a new project with create-react-app.
  • Organize components inside the src/lib directory for publishing to npm.
  • Create example web pages to test and demonstrate component usage.
  • Start a development server for real-time component development.
  • Transpile and build the components in the dist folder.
  • Publish components to npm with README.md and dist folders.

Installation

  1. Open your terminal.
  2. Run the command npx create-react-app my-project to create a new React project.
  3. Navigate into your project directory cd my-project.
  4. Download the create-component-lib shell script by running curl -LJO https://raw.githubusercontent.com/{library-path}/create-component-lib.sh.
  5. Make the shell script executable by running chmod +x create-component-lib.sh.
  6. Run the script using ./create-component-lib.sh.

Summary

create-component-lib is a convenient tool for creating and publishing React component libraries. It leverages create-react-app to set up the project structure and provides an easy way to organize and build components for npm publication. Developers can also create example web pages to showcase the usage of their components. Overall, create-component-lib simplifies the development and distribution process of React component libraries.