/react-component-package

Scaffold a react component npm package with React, TypeScript, Jest, Docker and Webpack

Primary LanguageJavaScript

React NPM Package

  1. Installation
  2. Development
  3. How to Bundle

Development

Install and run the development enviroment locally on docker. See Installation

To create a new component run the following command and follow the prompts. This will create a new component, optional subdirectory and a Jest test file.

npm run new:component

Add the new component and features.

Import/Export the new component inside the ./src/Package.js

Then you can bundle the app.


How to Build/Bundle the package

Node Version: Node v16.15.1

Installing Node via NVM for Mac

Run the following to install dependencies.

npm install

Then run the following to output into the lib folder

npm run build