This is a project to help developers build, test and publish a react component to Node Package Magaer(npm).
MIT License
react-package-publisher
is a toolkit for reactjs developers to build, test and publish a react component to the Node Package Manager(npm). This project contains important commands in a script file to build, test and publish a package.
react-show-greeting is reactjs based package published using the
react-package-publisher
. This is an example package to greet you once you type-in your name.
Fork or clone this repo.
Change the directory to, react-package-publisher
Edit the package.json
with your package name, version, author, license, dependencies, devDependencies etc. Please note, the peerDependencies
are already set for a specific version of react
and react-dom
. Please feel free to change the versions suitable to your need. If you are new to the npm dependency management, please read this.
Create your component file and write the component code.
Run the build.sh
file. Please note, use a unix based terminal(example, GitBash) to run the build.sh
file.
./build.sh
build.sh
file?The build.sh
file is the main file that helps in building, packaging and publishing your react component to the npm. It helps automating many steps that are usually need to execute line by line and time consuming. It contains commands to faciliate the followings,
dist
folder. This folder will be generated at the compilation step automatically.index.js
file. This file will be generated at the compilation step automatically.yarn install
(Dependency Management).index.js
file and dist
folder.README.MD
, *.scss
etc files to the dist
folder.npm-login-noninteractive
. Please edit the required parameter values like, <USER_NAME>, and . Please install npm-login-noninteractive globally as a depenency to use this option.Stargazers
who has supported this project with stars(⭐)Here is the step-by-step turorial about how to use this toolkit.