linkstrap v0.0.3
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 linkin Dnpm linkin Enpm link Din Anpm linkin Anpm link Din Bnpm link Ein Bnpm linkin Bnpm link Ain Cnpm link Bin Cnpm linkin 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