npm-package-publish-starter
v1.0.8
Published
Start coding instantly with a pre-configured environment that adheres to best practices
Downloads
4
Maintainers
Readme
npm-package-publish-starter
Start coding instantly with a pre-configured environment that adheres to best practices.
This package is a streamlined boilerplate designed to help developers quickly create and publish UI component packages to npm. This starter kit includes essential configurations and a sample component to kickstart your development process. With npm-package-publish-starter
, you can focus on building unique and reusable UI components without worrying about the initial setup.
Prerequisites
This project requires NodeJS (version 8 or later) and NPM. Node and NPM are really easy to install. To make sure you have them available on your machine, try running the following command.
$ node -v
v18.18.2
$ npm -v
9.8.1
Features
- Pre-configured with Webpack and Babel for bundling.
- Includes a sample React component.
- Ready-to-use npm scripts for easy build and publish.
Getting Started
Start with cloning this repo on your local machine:
$ git clone https://github.com/towfigh/npm-package-publish-starter.git
$ cd npm-package-publish-starter
To install and set up the library, run:
$ npm install
Or if you prefer using Yarn:
$ yarn
Usage
Watch live changes
$ npm run storybook
Testing
$ npm run test
Building a distribution version
$ npm run build
This task will create a distribution version of the project
inside your local dist/
folder.
Publish
- Change
package.json
configs as you want:
"name": "YOUR PACKAGE NAME",
"version": "XX.YY.ZZ",
"description": "YOUR PACKAGE DESCRIPTION",
"author": "YOUR NAME",
"keywords": ["YOUR" , "KEY" , "WORDS"],
- Build the project:
$ npm run build
- Login to npm with:
$ npm login
- Publish your package:
$ npm publish
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Add your changes:
git add .
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request!
Built With
- react
- rollup
- storybook
- Love
Authors
- Tofigh Nazari