0.2.5 • Published 5 years ago
config-service-mgr v0.2.5
Steps to create a simple npm package and publish it.
Pre-requisite
- Create a npm account if you don't have.
Create a project
- Create a project which you want to publish.
- Go to that folder and run
npm init
and follow the instructions. - Give the appropriate package name because it will be publish the specified package name.
Note:
Package name must be unique. - Create the index.js (or the file which you have mentioned while creating package.json) file.
- Add the functionality.
- Run npm publish (make sure you have already logged in. If NOTE then run, npm login)
- Visit your profile to see the published package. URL: https://www.npmjs.com/~your-username
Update the published npm package.
- In case of patch, run, npm version patch
- In case of minor, run, npm version minor
- In case of major, run, npm version major
- npm publish
- Verify the published package.