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 🙏

© 2024 – Pkg Stats / Ryan Hefner

packweb

v1.5.0

Published

Tools for managing projects with large numbers of npm modules

Downloads

27

Readme

PackWeb

Greenkeeper badge

This is a collection of CLI tools designed to help with applications which are webs of interrelated NPM packages. Features currently include:

  • show NPM owners for all packages and compare with lists of desired owners
  • automatically bring NPM ownership into line with what is desired

Install:

npm install -g packweb

Use:

First of all we have to define a configuration file which specifies which NPM modules we're interested in performing all our operations on. This should be a JSON file with two keys: packages and owners. At the minimum, these are simple arrays of package names and NPM usernames, e.g.:

{
    "packages": ["foo", "bar", "baz"],
    "owners": ["alice", "bob", "charlotte"]
}

We can pass in this data to packweb as a command-line JSON string, a path to a JSON file, or a URL for a JSON file (say if you want to keep it in a GitHub repo). The simplest thing to do is simply --show ownership status:

packweb --show --config ./packweb.json

This will output a color-coded report that tells you how the ownership status of the packages in your list differs from what's desired. If you want, you can automatically update the ownership status (assuming you are yourself an owner of all the packages being managed by packweb):

packweb --update --config ./packweb.json

You might be thinking that your project is a bit more variegated: you have some packages which should have some owners, and some packages which should have all owners, and yet others which should have even a different set of owners. That's easy to do by making your packages and owners keys a hash of "groups" instead! Take a look at this example packweb.json:

{
    "packages": {
        "coredevs": ["foo", "bar"],
        "contractors": ["bar"],
        "admins": ["foo", "bar", "baz"]
    },
    "owners": {
        "coredevs": ["alice", "bob"],
        "contractors": ["charlotte"],
        "admins": ["doug", "erin"]
    }
}

You can get as complicated as you like with groups in this way. The only rule you have to follow is making sure the group names are the same for both packages and owners!

For a complicated packweb.json example, see Appium's packweb.json.

Hack on Packweb

# transpile and run tests on every change
gulp

# transpile and run tests once
gulp once