Skip to content

link-local-dependencies 1.0.4

Install from the command line:
Learn more about npm packages
$ npm install @plaidev/link-local-dependencies@1.0.4
Install via package.json:
"@plaidev/link-local-dependencies": "1.0.4"

About this version

Link local dependencies

Just make relative symbolic links in local dependencies, not update, install or check differences.

Usage

  • package.json
{
  "scripts": {
    "postinstall": "npx @plaidev/link-local-dependencies",
    "local:postinstall": "echo 'this script will be executed after linking local dependencies'"
  },
  "localDependencies": {
    "packageA": "./packages/packageA"
  }
}
  • js
import packageA from 'packageA';
const packageA = require('packageA');
  • make links
$ npx @plaidev/link-local-dependencies

Before you use

This package requires node.js >= 10.12.0, since we use fs.mkdir with recursive option.

Why

We, dev members in plaid inc, are developping very big product which is written in nodejs with mono structured repository. To develop mono structured repository with nodejs, we have to orchestrate multiple packages to harmonize each other. Luckily, there are some choices to handle it. For example, lerna is one of these, which is widely used in many mono structured projects. We tried several useful utilities, lerna, yarn workspace, pnpm workspace, and npm link. These utilities, however, were not suited to our case. Lerna forces us to unnecessarily learn extra usages, yarn hoisting breaks docker environment with too many filesytem use, pnpm breaks dependency solving, and npm link has fatal bugs! Eventually, we adopted an super simple solution - just linking -.

Details


Assets

  • link-local-dependencies-1.0.4.tgz

Download activity

  • Total downloads 47,217
  • Last 30 days 25,271
  • Last week 6,430
  • Today 0

Recent versions

View all