I published the insane-cli project to npmjs.com
Published: | Updated:
In this lab 09, I was working with my previous project called insane-cli and this week lab was about how to publish my insane-cli project on Github to NPMJS.com so that other users can install it remotely using command:
npm install insane-cli on their own computer command line tool. You can check out my package which is being published here. With instructions I guess everyone can figure out how to use it as a basic user.
- But let’s talk about the process how I publish it to npmjs.com
- First, I will need to test the project to make sure everything works fine, write some tests if needed.
- Then update package.json file, some important fields such as: name, version.
- After that, I created a new account on npmjs.com and navigate to terminal, run command ‘npm login’ and use new account to log it in.
- After that, use the command ‘npm publish’ to publish my package to npmjs.com.
- Everytime I need to make change to the project and need to update it on npmjs, just simply modify ‘version’ in package.json file and run ‘npm publish’ to update.
Finally my package has been published and now I know to publish my own project to npmjs.com.