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

watchwomen

v2.0.1

Published

Replaces npm link with something that actually works!

Downloads

4

Readme

NOTICE: Actual create is wix/wml, due to apparant lack of updates. It contains fixes and enhancements. I will continue to pull updates from upstream.

Tangible symlinks

watchwomen listens to changes in some folder (using Watchman) and copies changed files into another folder.

Why?

Let's face it, sometimes symbolic links just aren't enough. Github has more than 10K issues with the words "support for symlinks" in them.

Two examples I've encountered so far were: React Native's packager lack of support for them and Webpack's inability to find linked modules dependencies (working around this has issues of its own). A lot of people resolve to working directly from the nodemodules folder in these cases, but _a. if your package is required by two projects on which you are working simultaneously, you're screwed, and b. it just feels wrong.

watchwomen makes use of Facebook's ultra-fast Watchman to watch for changes in your source folder and copy them (and only them) into your destination folder.

watchwomen is a CLI tool that works pretty much like ln -s. You first set up your links by using the watchwomen add command and then run the watchwomen service (watchwomen start) to start listening. That's it!

Note that since watchwomen is based on Watchman it does not support symlinks. lol.

Install

npm install -g watchwomen

Usage

# add the link to watchwomen using `watchwomen add <src> <dest>`
watchwomen add ~/my-package ~/main-project/node_modules/my-package

# start watching all links added
watchwomen start

Commands

add

watchwomen add <src> <dest> (or watchwomen a)

skip ignor prompt

watchwomen add <src> <dest> --skip-prompt

Adds a link.

watchwomen will not start listening to changes until you start it by running watchwomen start.

Each link is given an unique id, you can see all links and their ids by running watchwomen list. Links are saved to src/links.json in your watchwomen install directory, meaning that your configuration is specific to that watchwomen install.

autoAdd

watchwomen autoAdd <repo_root> (or watchwomen aa)

Automatically links packages used in this project with packages in a given repos folder.

This is the power command: when you have many packages that you develop locally across your projects, you normally keep them in one root folder. When you start a new project and npm install one of your packages, use watchwomen aa and watchwomen will see match your local package to the package in your repo root.

rm

watchwomen rm <linkId> [<linkId>...]

Removes one or more links. Passing all as linkId removes all links.

start

watchwomen start (or watchwomen s)

Starts watchwomen.

It first copies all watched files from source to destination folder and then waits for new changes to happen.

list

watchwomen list [--src|--dst (or watchwomen ls)

Lists all links, optionally sorting by source or destination paths.

Shows each link's id, state and source/destination folders.

enable

watchwomen enable [linkId] (or watchwomen en)

Enables a link. Passing all as linkId enables all links.

If you don't specify a linkId watchwomen will open in interactive mode.

disable

watchwomen disable [linkId] (or watchwomen d)

Disables a link. Passing all as linkId disabled all links.

If you don't specify a linkId watchwomen will open in interactive mode.

Great for re-using old links without having to type them over and over again.

Miscellaneous

Ignored folders

When adding a new link watchwomen will try to detect if your source folder is a git repository or an npm package, it will then offer to ignore the ".git" and "node_modules" folders for you.

If you want to add more folders to your ignored folders first create a file named .watchmanconfig in your source folder, this file should contain Watchman's configuration for this folder. See example below to learn how populate it or check out the Watchman docs to learn more about Watchman configurations.

In the following example we are ignoring the ".git" and "node_modules" folders:

{
  "ignore_dirs": [".git", "node_modules"]
}

Contributing

See the Contributing page.

License

Copyright (c) 2016 Wix. Licensed under the MIT license.