npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@chris-dickson/hello-world-node

v1.0.7

Published

A step-by-step guide to setting up a public NPM module with CircleCI continuous integration and deployment

Readme

Hello-World-Node

A step-by-step guide to setting up a public NPM module with CircleCI continuous integration and deployment

Setting up NPM publishing to an Organization

  1. Create user account on https://npmjs.com

  2. Once your account is created, create an organization. For example '@my-organization'

  3. Initialize it as an NPM project and call it "hello-world-node":

    npm init
  1. In your package.json, ensure that you have the name field set to scope the package to your organization:
    "name": "@my-organization/hello-world-node"
  1. Create an index.js file with a simple export:
    exports.printMsg = function() {
        console.log("Hello world, from node");
    }
  1. Authorize your NPM user account on this machine for pushing to your NPM repository:
    npm login
  1. Publish version 1.0.0 of the package to public NPM:
    npm publish --access public

Testing the Published Package

  1. In a separate directory, create another NPM project called "hello-world-node-consumer" by running:
    npm init
  1. Install your published packaged:
    npm install --save @my-organization/hello-world-node
  1. In your index.js file, add the following:
    var hello = require('@my-organization/hello-world-node');
    
    hello.printMsg();
  1. Running node index.js should output the text:
    "Hello world, from node"

Setting up CircleCI

  1. Create a Github respository for your "hello-world-node" project and push the existing source code

  2. Go to https://circleci.com/ and sign-up, using Github authorization

  3. Ensure that your "hello-world-node" is the only project imported

  4. CircleCI automatically detects that this is an NPM project and immediately starts a build. You'll notice the builds failed because tests did not pass. By default, NPM will have the following script for newly initialized projects:

      "scripts": {
        "test": "echo \"Error: no test specified\" && exit 1"
      },

It will execute the test script, and fail on any non-zero return code.

  1. Install gulp in your "hello-world-node" project:
    npm install gulp
  1. Add a gulpfile.js to run a test:
    var gulp = require('gulp');
    
    gulp.task('test',function(done) {
        console.log("Run your tests here, any non-zero exit code causes CirlcleCI to fail");
        process.exit(0);
    });
  1. CircleCI needs to have Gulp install globally to run it. Create a circle.yml file to install Gulp before each build:
    dependencies:
      pre:
        - npm install -g gulp
  1. Commit and push the changes to Github, and your build should now pass.

Continuous Deployment to NPM

  1. Get the NPM authorization token from the NPM resource file:
    cat ~/.npmrc

It should look like the following:

    //registry.npmjs.org/:_authToken=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  1. In the project settings for your CircleCI project, add the following environment variable:
    name = NPM_TOKEN
    value = xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  1. Modify your circle.yml file to look like the following. It will automatically push tagged builds to NPM:
    dependencies:
      pre:
        - echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
        - npm install -g gulp
    deployment:
      npm:
        tag: /v[0-9]+(\.[0-9]+)*/
        commands:
          - npm publish --access public
  1. Create a new version of "hello-world-node" by running:
    npm version 1.0.1
  1. Push to Github and follow tags:
    git push --follow-tags
  1. Once the build completes, version 1.0.1 of "@my-organization/hello-world-node" should be deployed to NPM