Release
You can find my release here.
Release tool and package registry used
Installing the package
Installation instructions for node-tilify package can be found here.
Process of creating a release
I watched a couple of videos, read the documentation and a blog before I was able to successfully release the tool on npm. Videos watched include Creating Node.js modules & Publishing npm packages from npm's youtube channel and How To Create And Publish Your First NPM Package from Web Dev Simplified's youtube channel. Reading documentation included npm's very own documentation and blog includes Publishing a Node.js CLI tool to npm in less than 15 minutes. The steps I performed are below:
Ran
npm run adduserto create a user account on npm and link that user account locally to my machine. Rannpm version patchto upgrade the semver, followed bynpm publish —access publicto publish the package. Package was released withv1.0.0. Tested by runningnpm i node-tilifyfollowed bynode-tilify -hand it didn't work.I assumed the location of the index.js was incorrect so I moved it from
/srcdir to/root dir part of commit b832ef9e. Rannpm version patchto upgrade the semver, followed bynpm publish —access publicto publish the package. Package was released with patch releasev1.0.1. Tested by runningnpm i node-tilifyfollowed bynode-tilify -hand it didn't work.I assumed the code within
/index.jswas exposed out in the open without being invoked by a function so I edited the code by putting all of the code into a function and then invoking that function at the bottom of/index.jspart of commit 6597c56a. Rannpm version patchto upgrade the semver, followed bynpm publish —access publicto publish the package. Package was released with patch releasev1.0.2. Tested by runningnpm i node-tilifyfollowed bynode-tilify -hand it didn't work.According to the blog that I read, it suggested adding a shebang line
#!/usr/bin/env nodeat the top ofindex.jsfile so that systems like Unix can understand what executable to use to run the script, which in this case is node. Also added a property"bin": "./index.js"within/package.jsonfile so that npm can install the package globally, refer to the bin entry and link the package name with the index.js file as specified in the./package.jsonconfiguration parth of commit 1583e704. Rannpm version patchto upgrade the semver, followed bynpm publish —access publicto publish the package. Package was released with patch releasev1.0.3. Tested by runningnpm i node-tilifyfollowed bynode-tilify -hand it didn't work.I missed one step from the blog, running
npm link.npm linkis a command-line tool for symlinking a local package as a dependency during development. It is commonly used for testing packages before publishing them. Rannpm linkto link the package locally, followed bynpm version patchto upgrade the semver, followed bynpm publish —access publicto publish the package. Package was released with patch releasev1.0.4. Tested by runningnpm i node-tilifyfollowed bynode-tilify -hand it finally started working.It was then time to update the documentation with latest information on how to install the package from npm. I pushed the commit e8eb1820. Ran
npm version patchto upgrade the semver, followed bynpm publish —access publicto publish the package. Package was released with patch releasev1.0.5. Tested by runningnpm i node-tilifyfollowed bynode-tilify -hand it worked fine.Finally it was time to push all the tags to Github, ran
git push --follow-tagscommand and then performed a release manually from GitHub to releasev1.0.6to the public.
User Testing
Manual user testing went quite well, which was unexpected. My tool only has 1 step to get it installed on another user's computer and they are ready to go to use the software. They did however point out a thing to fix on my documentation. The readme.md file mentioned the incorrect way to use the tool. It mentioned invoking the tool using node src/index.js -h which was now changed to node-tilify -h. Besides, they mentioned moving all the information regarding developer contributions like cloning a repo, installing the packages and running the repo code from the command line to contributing.md for better clarity. Also, they got stuck figuring out what passing a directory meant for input and output flags, so I explained it to them and they were able to get going after that point. Moreover, initially, they were reluctant to use toml configuration from the command line but then figured it out after reading the documentation a couple of times. Based on the feedback received the documentation was updated accordingly.
Learning Outcomes
This was a fantastic exercise for me considering I've never published packages to npm and releasing software to the public. I learnt how to test the software before publishing or releasing, publish a package on a registry, add git tags being part of the release, release the software on GitHub and perform user testing to gain valuable feedback from them to improve the documentation which in turn increases user adoption helping to capture wider audience who'd use the software.
Top comments (0)