0.0.3 • Published 8 years ago

linkstrap v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
8 years ago

Linkstrap

A small utility for automatically installing dependencies and cross-linking them. I wrote this for one specific use case, but it can be used fairly easily in other places as long as the target project architecture is similar.

Specifically, linkstrapping is useful when setting up a development environment that consists of multiple modules which depend on each other to execute. I.e:

A depends on D
B depends on D, E
C depends on A, B

This requires the following commands to resolve:

  • npm link in D
  • npm link in E
  • npm link D in A
  • npm link in A
  • npm link D in B
  • npm link E in B
  • npm link in B
  • npm link A in C
  • npm link B in C
  • npm link in C

With linkstrap, this can be solved by adding the following to package.json:

  "linkstrap": {
    "path": "SUBFOLDER",
    "targets": [
      "A",
      "B",
      "C",
      "D",
      "E"
    ]
  }

As long as the target modules have their dependencies properly listed in their own package.json manifests, running linkstrap will result in a new folder named SUBFOLDER being created within the parent module's root dir with the target modules cloned from git, cross-linked, and linked into the parent project.

Hence, a requirement of this is that A, B, C, D, and E need to be included in the outer/parent module's dependency list, resolved to git URLs.

For now, branches/tags are ignored, although this can easily be fixed in the future.

Linkstrap. For when bootstrapping just won't cut it

0.0.4

8 years ago

0.0.3

8 years ago

0.0.1

8 years ago