A minimalistic boilerplate for publishing a React component to NPM.
A minimalistic boilerplate for publishing a React component to NPM:
You get to decide how to bring those in yourself if you decide that you need it.
This boilerplate focuses on getting you publishing as fast as possible.
cd
into it:git clone https://github.com/adrianmcli/dev-react-component.git my-new-component
cd my-new-component
rm -rf .git
and then run git init
to start fresh.yarn
or npm install
to install the dependencies.name
, version
, and description
inside package.json
.src/MyComponent.js
.npm publish
to publish your component.This boilerplate makes use of React Build Lib and React Build Dist in order to generate the lib
and dist
folders for distribution. These two tools generate CommonJS and UMD modules respectively. Use of Babel and Webpack is hidden under the hood so that you can concentrate on sharing your component.
Note that these tools are extremely early in their development (i.e. this is as pre-alpha as it gets).