Release find-broken-link

Safrin
3 min readDec 2, 2020

Finally, it came to the end of the term and end of my lab sessions working with link checker tool. This was a crazy wonderful journey! ( note: not a goodbye post…we still have a long way to go! )

For this last lab, I got the chance to work with publishing my link checker tool so that it can easily be installed and run without going through the hassle of cloning the repo and following lists of instructions. The process of accomplishing it is easier than it sounds.

As I used node.js to build my tool, the approach I chose for the release is using npm.

Setting up for release

To set up, I just followed these steps and it was quick and easy:

  • create a npm account
  • login to npm account from the command line: npm login
  • create package.json or modify existing package.json if needed

Tagging The Release

To tag my first ever release, I created annotated tag with my version number:

git tag -a v1.0.0 -m "my version 1.0.0"

Followed by git tag to make sure tag was created. Later, I pushed the tag to my main branch by running git push --follow-tags

Final look of `git tag` in main branch

Successful Release

Finally to publish my tool, I ran npm publish (if there is name conflict with package name, the publish will fail. In that case, change the package name to something unique and you can search if the name already exists by searching it in npm)

Done!! My tool is now available in npm registry and anyone can install it by typing:

npm i findbrokenurl

Update README.md

I updated my doc with following information :

  • to install the package, typenpm i findbrokenurl
  • to run the package, typenpx fbl with available options

Testing Time

To see if my CLI still works perfectly, I asked one of my friend’s help. She created a new project and installed my package to her project following the doc. Then, did some test run with different commands:

  • npx fbl
  • npx fbl -f test.html

To sum up my journey of labs in DPS909, I just want to say I am so thankful that I decided to take this course. This course taught me more than any other courses in terms of coding, collaboration, obviously Git, and most importantly boosting up my confidence. A huge thank you to my prof who is amazing in everything he does!! I said at the very beginning it is not a goodbye post, but looks like I am starting to forget it; I guess I should better stop now. I will be back soon with my update on release 0.4. Byeeee for now!!

--

--