Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
November 26, 2022 12:31 am GMT

Software Release Via NPM

For this lab, I have chosen to release my tool via the use of NPM.

Preparation before publishing

Create a package.json file if you don't have in the root directory.
Use this npm init to create the new package.json file.

A package.json file:

  • Lists the packages your project depends on
  • Specifies versions of a package that your project can use using semantic versioning rules
  • Makes your build reproducible, and therefore easier to share with other developers
  • Make sure to add the name, version and author in your package.json file.

ADD a README.md file to a package:

  • In a text editor, in your package root directory, create a file called README.md.
  • In the README.md file, add useful information about your package.
  • Save the README.md file.

Publish your release:
-Make sure you have created the account npm and verified it.

  • Use the npm login on your terminal. Login with your username and password.
  • Use npm publish --access public to create and publish scoped public packages.

Note: Update types
Each digit in the version has it's own meaning:
1) First digit means major release.(resetting two later digit to zero)
2) Second digit means minor change in the software(resetting last digit to zero)
3) Last digit means a patch release.

Installing

After releasing my static site to install it locally on your device you can use npm i button-ssg to download my program.

Feedback

It's important to avoid taking feedback as personal criticism. When people provide us with feedback, we should be grateful because they are actually pointing out areas in which we need to improve.

Thoughts

This lab was a welcome one, that allowed us to contribute more to the community if anything. It was a first for me when publishing to npm, but this is useful information. I have always wondered how people were publishing their programs and now here I am, doing just that.


Original Link: https://dev.to/lostbutton/software-release-via-npm-3j25

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To