Publishing npm package Part 2: Package Updation

Yuvraj Patil
1 min readDec 17, 2023

Photo by Paul Esch-Laurent on Unsplash

In today’s world front end ecosystem is changing rapidly. Lots of new features, frameworks, libraries are coming out.

We have covered how to create and publish our own npm package in previous blog. In this blog we are going to publish our updated npm package.

Steps to publish npm package changes

1. Install node dependencies

npm install

2. Make changes in source code and commit.

git commit -m 'Added feature to format contact number'

3. Login into npm account

npm login

4. Build Source code to JavaScript code folder.

npm run build

5. Create patch version using following command. It will update local package.json version and makes local git commit.

npm version patch

6. Publish npm package using following command. It will publish the npm package to npm website.

npm publish

7. Push the code to git repository using following command.

git push

Now our package will be published to npm repository and our code will be pushed to our github repository.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Yuvraj Patil
Yuvraj Patil

Written by Yuvraj Patil

Riding the dragon in realm of React Native. Website: https://.www.yuvrajpatil.com

No responses yet

Write a response