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

@georgwittberger/watch-local-deps

v1.0.2

Published

CLI to automatically reinstall local dependencies on changes

Downloads

9

Readme

watch-local-deps

CLI to automatically reinstall local dependencies on changes. This tool watches the local directories of specified packages that your project depends on and reinstalls them whenever changes are detected, streamlining local development workflows.

A typical use case is the development of applications which depend on a shared library. Imagine you want to test some new feature developed in that library in one dependent application. Approaches like using npm link have downsides when it comes to dependency management and hot module reloading.

This tool automatically reinstalls the library as a normal NPM package in your application when changes are detected in the library's local directory by executing the following steps:

  1. Create tarball using npm pack in the library project. The tarball is stored in a temporary directory.
  2. Install the tarball in your application project using npm install --no-save.

Configuration File

Create a watch-local-deps.json file in the root directory of the project which depends on packages you want to watch. The configuration must follow the schema defined in config-schema.json.

Example configuration:

{
  "$schema": "https://raw.githubusercontent.com/georgwittberger/watch-local-deps/refs/tags/v1.0.0/config-schema.json",
  "packages": {
    "my-library": {
      "localDir": "../my-library",
      "watchDirs": ["dist"],
      "installDebounceMs": 1000
    },
    "another-package": {
      "localDir": "../another-package",
      "watchDirs": ["out", "public"]
    }
  }
}
  • localDir: Path to the local package directory (absolute or relative to configuration file). This is the directory from which the tarball is created on changes.
  • watchDirs: Array of directories (relative to localDir) to watch for changes inside the package directory. If the watched package has a build script you should only watch the directories containing the build output.
  • installDebounceMs: (Optional) Debounce time in milliseconds before package is reinstalled in your project (default: 500). Increase this time if the build process of the watched package takes longer between individual files. Ensures that package is only reinstalled after build is complete.

Global Usage

Install the CLI globally:

npm install --global @georgwittberger/watch-local-deps

Run the watcher in your project directory:

watch-local-deps

Local Usage in NPM Scripts

Install as a development dependency:

npm install --save-dev @georgwittberger/watch-local-deps

Add a script to your package.json:

{
  "scripts": {
    "watch-local-deps": "watch-local-deps"
  }
}

Run via npm in your project directory:

npm run watch-local-deps

License

This project is licensed under the MIT License.