First NPM Package

Overview

npm install osd600-ssg –save
So I am very excited that I have published my first package to NPM. As a Javascript developer, I have used many NPM packages more than I can remember, now, my tool has become a part of them.

P…


This content originally appeared on DEV Community and was authored by Hung Nguyen

Overview

npm install osd600-ssg --save
So I am very excited that I have published my first package to NPM. As a Javascript developer, I have used many NPM packages more than I can remember, now, my tool has become a part of them.

Process

I tested my tool locally first to find any possible errors. Then I went to the Internet and did some research and went through some tutorial about how to publish a package to NPM. The steps were not complicated so that all the developers with different levels could publish their tools to the community. However, I had to modify some files.

In package.json, the name of the tool needed to be lowercase, for me, it was not satisfied about that because the original name was all uppercase as that was my favorite naming. I then forgot that I needed to add a git tag to give my tool a version. README.md needed to be updated as well, since my tool now can be run with npm install osd600-ssg, the developers who would like to contribute do not have to clone my git repo anymore. On top of that, I realized that in package.json, I could add a property called repository. This would allow NPM to create a link to your GitHub repo, which is very convenient. Just like GitHub, NPM can read your README.md so it was not difficult for me to fix the instruction and features of my package. And everything is good for other users to test.

Testing

I downloaded my package and tested it. It worked as I expected. I also invited some of my friends to try OSD600-SSG. So far, one of them has had a good review on it, but he recommended me that I needed to specify what packages I used in my tool. Right now, I have still been waiting for the others' feedback.

Usage

npm install osd600-ssg --save
As simply as that. If you have a text or markdown file, and you want to convert it to HTML file, after installing my package, just simply write:
osdssg -i
There are still a lot of options, and you can find them out in the documents in both GitHub and NPM sites. Your feedback will be important for me to improve the tool so that it will get better and better.

Links

GitHub: https://github.com/nguyenhung15913/OSD600-SSG
NPM: (update soon)


This content originally appeared on DEV Community and was authored by Hung Nguyen


Print Share Comment Cite Upload Translate Updates
APA

Hung Nguyen | Sciencx (2021-11-26T11:15:08+00:00) First NPM Package. Retrieved from https://www.scien.cx/2021/11/26/first-npm-package/

MLA
" » First NPM Package." Hung Nguyen | Sciencx - Friday November 26, 2021, https://www.scien.cx/2021/11/26/first-npm-package/
HARVARD
Hung Nguyen | Sciencx Friday November 26, 2021 » First NPM Package., viewed ,<https://www.scien.cx/2021/11/26/first-npm-package/>
VANCOUVER
Hung Nguyen | Sciencx - » First NPM Package. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/11/26/first-npm-package/
CHICAGO
" » First NPM Package." Hung Nguyen | Sciencx - Accessed . https://www.scien.cx/2021/11/26/first-npm-package/
IEEE
" » First NPM Package." Hung Nguyen | Sciencx [Online]. Available: https://www.scien.cx/2021/11/26/first-npm-package/. [Accessed: ]
rf:citation
» First NPM Package | Hung Nguyen | Sciencx | https://www.scien.cx/2021/11/26/first-npm-package/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.