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

npm-interlink

v0.2.0

Published

because `npm link ...` can be tedious

Downloads

5

Readme

npm-interlink

Version npm Dependencies js-standard-style

Sets up several node projects for local development using npm link. Especially useful in the context of nvm and / or having many projects that depend on each other.

Why

  1. quickly setup a bunch of modules for local development or experimentation (install or link)
  2. link a bunch of modules among themselves, without having to remember the interdependencies
  3. relink the same modules in another context, e.g. because nvm links modules per node version
  4. easily link the modules incrementally, just rerun it and new modules get linked, linked to

How

All it needs are project paths, or it tries the immediate subdirectories of the current dir. Any dir with package.json will be npm linked - making its module global. Any dir with package.json dependencies referencing a linked module will get them linked to its node_modules. Already linked modules that are not explicitly part of an interlink set will not be linked to.

Use

NPM

Clone some node.js projects and run npm-interlink in their parent directory. Clone is really a metaphor here, as npm-interlink is agnostic to version control.

Options

Because npm-interlink makes it easy to setup many node projects, potentially saving a lot of time that would be otherwise spent waiting to oversee command results, I added some options that can ask it to do something other than its default behavior.

  • -i or --install will install the node_modules for each package and skip linking altogether - keep in mind that npm link and thus npm-interlink without options will also install, so this is for install only
  • -o or --only will only interlink modules that are already linked, this is perhaps because one wants partially interlinked modules, also npm link module is a very fast command compared to npm install or npm link (self), thus linking incrementally is a good pattern, perhaps this should be the default...

Configure

Create a .npm-interlink file containing the list of dirs / modules to interlink. Use relative or absolute paths - one per line.

For example, here is how I interlink the gulpsome beverage modules, plus a couple of other projects of mine that they depend on:

be-goods
beverage
../childish-process
gulp-cause
gulp-harp
gulp-npm-run
gulp-npm-test
hal-rc
../sourcegate

How you setup the directory structure is entirely up to you, though this obviously works well for organizations (collections of repos). One can start with a subset and add more projects as the need to work on them arises.

Develop Dependencies

js-standard-style

License

MIT