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

@ghostbuster91/nodejs-packager

v0.4.0

Published

This project draws inspiration from various projects from jvm ecosystem:

Readme

nodejs-packager

This project draws inspiration from various projects from jvm ecosystem:

Goals of the project

nodejs-packager primary goals is creating a Docker image which can “just run” your nodejs application. At the same time it tries to:

  • follow best practices when packaging your application
  • be concise
  • be easy to use
  • cover the most popular use-cases

Covering 100% of the use-cases is not a goal of that project. If you have a very specific setup consider getting back to plain Dockerfile. Having said that, most common use-cases should be covered. If your use-case is not covered please file an issue and we can think what to do with it together.

Usage

Keep in mind that this project is still in experimental phase. Use it at your own risk!

Install packager globally: npm install -g @ghostbuster91/nodejs-packager

or add to your project: npm install --save-dev @ghostbuster91/nodejs-packager

and add corresponding entries for each relevant command to the scripts section of your package.json e.g.:

"scripts": {
  "docker-clean": "nodejs-packager clean",
  "docker-stage": "nodejs-packager stage",
  "docker-build": "nodejs-packager build",
  "docker-publish": "nodejs-packager publish"
}
Usage: nodejs-packager [options] [command]

Options:
  -v, --version                output the version number
  -l, --log-level <log_level>  log level (default: "INFO")
  -c, --config <fileName>      config file name (default: "dockerconfig.ts")
  -h, --help                   display help for command

Commands:
  stage                        Generates a directory with the Dockerfile and environment prepared for building a Docker
                               image.
  build [options]              Builds an image using the local Docker server.
  publish [options]            Builds an image using the local Docker server and pubishes it to the remote repository
  clean                        Deletes all the temporary files and removes built images from the local Docker server.
  init <template>              Generates initial dockerconfig.ts for given template
  help [command]               display help for command

Configuration

The minimal configuration looks as follows:

module.exports.userConfig = async () => {
      return {
          imageConfig: {
              baseImage: "node:15-alpine",
              entrypoint: ["node", "index.js"],
              aliases: [],
          }
      }
}

Currently supported additional options for building images:

  • workdir?: string;
  • exposedPorts?: number[];
  • exposedUdpPorts?: number[];
  • command?: string[];
  • aliases: {name: string; tag: string;}[];
  • dockerUpdateLatest?: boolean;
  • template?: string;
  • maintainer?: string;
  • mappings?: { from: string; to: string;}[];
  • envVars?: { key: string; value: string;}[];
  • volumes?: string[];

Templates

Templates define how layers within the docker image are built. Currently there are only two of them: NPM_JS and NPM_TS. If neither of these is specified, default one is used (NPM_JS).

Authorization

nodejs-packager will try to use daemon-wide credentials whenever possible. If this isn't an option for you, or it is insufficient you can provide additional credentials using --auth option.

Releasing

Currently done manually through np (npm install --global np).

Contributing

nodejs-packager is an early stage project. Everything might change. All suggestions welcome :)

See the list of issues and pick one! Or report your own.

If you are having doubts on the why or how something works, don't hesitate to ask a question on gitter or via github. This probably means that the documentation or the code is unclear and should be improved for the benefit of all.