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 🙏

© 2025 – Pkg Stats / Ryan Hefner

meshwork

v0.0.32

Published

Multi-module package.json manager

Readme

meshwork

Multi-module package.json manager.

build analysis code style: prettier testing NPM

Manages multiple submodules that contain individual package.json files. The project contains a base package.json and N sub package files (one for each module). This program will then scan each of the subpackages and merge the contents of the base into the each submodule. This is a way to put common information into the base package that all of the subpackages can inherit.

  • Merging of common dependencies.
  • Merging of common settings for tools like XO, ESLint, etc, from the base.
  • Preservation of values within submodules (they have higher precedence)

A project with the following contrived setup:

package.json
meshwork.json
modules/
    module1/
        package.json
    module2/
        package.json
    moduleN/
        package.json

When the application is executed, the package.json files within module1, module2, and module3 are merged together with the root package.json file. Each module will then preserve its customizations within its local version while also receiving the common/global information from the root package. Note that the modules directory is not necessary. The modules can be stored in any location one would choose. The configuration below explains how to customize the module layout.

Installation

This module uses yarn to manage dependencies and run scripts for development.

To install as a global package and cli:

$ yarn global add meshwork

To install as a development dependency with cli:

$ yarn add --dev meshwork

To build the app and run all tests:

$ yarn run all

Configuration and Usage

The application can be configured three ways:

  • A configuration file named meshwork.json.
  • A Command line parameter to a CLI named meshwork.
  • An inline JSON object passed to meshwork().

The inline JSON object has the highest precedence over the configuration file. This allows the program to override the settings programatically.

Configuration File

The application will look for a configuration at the root of the project named meshwork.json. This file contains the base package.json file and a list of modules that will be merged with the base:

{
    "base": "package.json",
    "modules": [
        "module1/package.json",
        "module2/package.json",
        ...
    ],
    "verbose": false
}

Command Line

The package.json files within each module can be built (merged) directly from the command line. A base package and a list of modules are given as parameters to the CLI:

$ meshwork --base=package.json --modules={file1},{file2},... [--verbose]

Inline

The configuration can also be passed directly to the meshwork() as a JSON object:

const meshwork = require('meshwork');

meshwork({
    "base": "package.json",
    "modules": [
        "module1/package.json",
        "module2/package.json",
    ],
    "verbose": false
});

Gulp Task

gulp.task('mesh', (done) => {
    meshwork({
        base: "package.json",
        verbose: true,
        modules: [
            "lib/package.json"
        ]
    });

    done();
});