customized-component-boilerplate-sbs
v2.3.2
Published
A bolierplate code to get started with writing reusable react components that can be published to as npm modules.
Downloads
15
Readme
React components as package.
A bolierplate code to get started with writing reusable react components that can be published to as npm modules.
git clone https://github.com/adityawankhede5/component-as-package-boilerplate.git
After it is cloned install the required dependencies with npm i
- Write all your components inside
lib/components
folder. - Write import and export for your components inside
lib/index.js
. - Build the components using
npm run build
command. - Now you are ready to publish.
- For publishing first time, make sure you change the
"name"
insidepackage.json
this is the name of your npm package. - To publish the components run
npm publish
command. You might need to login to npm using thenpm login
command.