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

git-npm-helpers

v0.2.0-alpha

Published

Commit generated files on release but hide them during development

Readme

git-npm-helpers

Helper scripts for maintaining private npm modules without a registry.

Why

npm allows you to add dependencies to modules maintained in git repos. This is a great solution for modules you'd like to use private and when you don't have a private npm registry server available.

This solution is a little problematic when you need to compile your code into a readily usable format, e.g. when you maintain your source in Typescript or ES2017. When you use the npm registry, this is not a problem, because you can always gitignore the compiled files and publish them to the registry.

However, when you maintain the module in a git repo, the compiled files need to maintained in the repo itself. This works but it does make code reviews more difficult, because the compiled files cannot be gitignored and therefore show up in pull requests.

git-npm-helpers allows you to keep your pull requests clean yet maintain compiled files in the repository

How

git-npm-helpers provides the following scripts:

  • git-hide: This forces git to ignore changes in a given directory.
  • git-unhide: This reverses the change and makes changes visible again.

Typically, you use the scripts for the directory where your files get compiled to. In the following example, our compiled files end up in a directory called dist.

  1. Add the directory to .gitignore
dist
  1. Use the scripts in your private npm module's package.json to implement your workflow

For example:

{
  "name": "my-private-git-module",
  "version": "0.1.1",
  "scripts": {
    // ...
    "preversion": "npm run lint && npm test",
    "version": "npm run build && git-unhide dist",
    "postversion": "git-hide dist && git push && git push --tags"
    // ...
  }
}

With this in place, you can release new versions of your module by running the standard npm version <version|level> command. npm tags versions automatically following the schema v<version>. For instance, in order to release a new minor version of your module, run:

npm version minor

This create a new build, bump the version, commit the changed files, tag the commit with the new version, and push the result back.

  1. Use the module in your project
{
  "name": "my-private-project",
  "dependencies": {
    "my-private-git-module": "git://[email protected]:owner/my-private-git-module.git#v0.2.0"
  }
}


## Known issues

- Sometimes, git gets unhappy about the changes in the dist directory when changing branches during development. Since these are throwaway files anyway, simply delete the files and rebuild.

- Git dependencies don't work well when being resolved as part of a Docker build. This repo includes a script that works around this issue by first checking out Git dependencies into local directories and then rewriting the respective dependencies in `package.json` to point to the local directories instead. At the moment, this script is Github-specific.