Skip to content

maxwfreu/create-npm-react-package

Repository files navigation

create-npm-react-package

Actions Status Maintainability

Easily create react packages to be distributed via NPM.

This package will set you up with a simple starter for your new react component package.

CLI preview

Installation

npm i -g create-npm-react-package

Usage

create-npm-react-package

Development

cd my-package
npm run start

The demo page will be available at localhost:3001

Deployment

Login to npm with

npm login

Then, build and publish your package:

npm run deploy

Publishing

In order to publish to NPM, you will need to create an account at https://www.npmjs.com/login. Once you’ve created your account, run npm login within your terminal. Once logged in, move into your newly created directory and run npm run deploy. This will build a production optimized version of your application and publish it to npm.