Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
November 27, 2021 06:39 am GMT

OSD600 - Publishing my-ssg To NPM

1. Lab10 requirement

After a long time updating my-sgg with new features, this time is an appropriate time to provide a release that allows users to install and use the tool easier.

Since the tool is written in NodeJS, I will make use of npm to share the tool.

2. Publishing process

In order to publish a package to npm, I need to create an npm account first. If not, an error code 404 will be appeared.
Image description
Next, I verified the email to authenticate the account. After having an authenticated account, I run npm login command then provided username, password and email to sign in the npm account.

When I logged in successfully, a message will be displayed to announce.
Image description

Finally, I run npm publish command to publish the package to npm.

After making sure that the package is available in npm I asked my friend to test the tool. Instead of telling her how to install and use the package, I recommended her to read through the README.md file first.
With the instruction on README.md she succeeded in installing the package. On her machine, she tested all the provided features and they all worked as expected.

3. Overall

This is an interesting lab, I have a chance to learn new knowledge about npm package since I never published a package before. Also, this is a good way to share my work with others.

All in all, thank you for reading the post.

Happy coding!


Original Link: https://dev.to/vivianvu/osd600-publishing-my-ssg-to-npm-52le

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