In the previous video, we setup Travis-CI for our project, triggered a build, and finally verified a build after pushing a new change.

This video picks up where we left off and we will publish our package to the npm registry so developers can find and install it more easily.

Goals

  • Tag version
  • Publish in NPM registry
  • Install from registry

Video Info

  • Episode: CW V009
  • Skill level: Beginner with basic git and npm skills
  • Prerequisites:
    • Basic Node.js & npm
    • Basic Git skills
  • Published: September 10th, 2014
  • Tags: js, nodejs,git,npm,hapi,plugin,free
  • Duration: 4:44
  • Node.js version: 0.10.25
  • Git version: 1.8.2.1

Notes

npm add-user  # add registry user account
npm publish   # publish current package to npm
npm info hapi-elapsed  # view info on hapi-elapsed from npm
npm doc hapi-elapsed   # open browser to hapi-elapsed docs
  • verify that package installs properly with all the necessary files by creating a new project and doing npm install hapi-elapsed and for more completeness, create an example and use the package.
  • hapi-elapsed - repo on GitHub
  • npm-adduser - manual page for adduser
  • npm-publish - manual page for publish
  • npm - npm registry - can perform web search for packages by name or keyword

In the next video

  • Update the plugin code for latest Hapi
  • Verify tests
  • Push updates to GitHub and npm