New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

create-component-lib

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-component-lib

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

0.1.6
latest
Source
npm
Version published
Weekly downloads
4
-60%
Maintainers
1
Weekly downloads
 
Created
Source

create-component-lib

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

Notes:

  • Uses create-react-app under the hood.
  • Inspired from this blog post.
  • Currenlty tested only on Linux and Mac.
  • It's really just a shell script. Contributions welcome!

Usage

To create a new project, run the command:

npx create-component-lib my-project

This sets up the project inside my-project.

Place everything you want to publish to npm inside src/lib. Outside src/lib (but inside src/), you can create example web pages to test or demonstrate the usage of your components.

To start the development server (with entry point src/index.js), run

npm start

To transpile src/lib and create a build in the dist folder, run:

npm run build

You can then publish it to npm using:

npm publish

Note that only README.md and the dist folders are published to npm.

To learn more, see this blog post or this sample libary.

Keywords

react

FAQs

Package last updated on 18 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts