DEV Community

Cover image for Wa! My API on the npm!!!
jsong89
jsong89

Posted on • Updated on

Wa! My API on the npm!!!

Github repo: https://github.com/juuuuuuun/jun-ssg
Npm package: https://www.npmjs.com/package/jun-ssg

OverView

Finally, the last lab 10!!! When I first started, I couldn't see the end of how to finish so many steps, but I can almost see the end with the semester :)

The task of this lab is to check whether the partner and each other's npm package work well after uploading the SSG API, which we have been working on as a release and lab, to npm!

What I have done

To meet the requirements of this lab, I chose npm. In addition, it was decided to set 1.0.0 as the release version based on the lab of the previous week for the release of the software. (1.0.1 as a modification of the current README)

After that, the first thing I did was add the version part using git tag.

First, in order to match the version with the git tag in package.json, version was set to 1.0.0.

After that, through the code below

git tag -a v1.0.0 -m "my version 1.0.0"
Enter fullscreen mode Exit fullscreen mode

Added version tag.

Afterwards, it was confirmed that the version was added normally through git show,
We confirmed that the version was successfully added to the Github repository through

git push origin 1.0.0
Enter fullscreen mode Exit fullscreen mode

Image description

Finally, after signing up for npm

npm adduser
Enter fullscreen mode Exit fullscreen mode

and

npm publish --public-access
Enter fullscreen mode Exit fullscreen mode

Finally, all the process I can do is over..!
Now, you can use the SSG API I made anywhere as long as there is an internet connection through the command below! :)

npm i jun-ssg
Enter fullscreen mode Exit fullscreen mode

 

Partner's experience

My great partner, Hung, tested my npm package and was a bit confused in the readme (difference between npm and git versions), but soon recognized the difference and successfully downloaded the package and actually ran it. Fortunately on his machine, my package worked just fine and produced a successful html output. However, he updated the Readme version because he felt confused in the Readme.

 

My test about partner's npm package

Unfortunately, there was a problem with the partner's npm package, so testing was delayed. Hung's npm package worked very well, contrary to what I thought (sorry Hung(人´З`)).


npm i osd600-ssg

I tried to download and run it simply through the above command, and I checked that all functions were working properly. :)

However, in the README, in the case of the npm version, it would be better to distinguish more precisely the difference between the usage and the case of downloading and using it from Github.

 

With Closing Final Lab..

To be honest, this lab10 was easy to complete because there was no process of making something new or very difficult. However, this is not to say that I didn't learn anything or that I liked it because it was easy. With this lab10, the question I had been wondering about how many kinds of APIs were uploaded to npm and how easy it was to use was solved, and I was also able to learn the importance of version control and the meaning of each part. It was a strange but very satisfying experience for someone to test and use my project. I think it will be one of the most important parts of my career and developing my skills going forward.

Top comments (0)