0.1.9 • Published 4 years ago

npm-multi-linker v0.1.9

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

npm-multi-linker

This utility is made to simplify the handling of multiple dependant npm modules. It allows you to link multiple dependencies of multiple modules with one simple command.

Determination on what to link is based on which modules are currently installed in the target module and which modules are found in the source modules. Be sure to npm install your dependencies before trying to link. Use the -i-option to install before linking.

Options

OptionLong OptionDescription
-d--dry-runOnly print the results.
-i--install-beforeRun npm install in each package before linking.
-n--npm-linkUse npm link istead of directly creating symlinks.
-p--package-pathPackage(s) on which dependencies shall be replaced.
-q--quietNo stdout output.
-r--recursion-depthHow deep to search for modules in search paths. if only -r is specified, it searches infinitly (may be slow)
-s--search-pathThese paths are searched for target modules for links.
-u--unlinkReset all links by invoking npm install in all packages.

Examples

Replace all dependencies of all modules in the current directory by links to modules in current directory

cd path/to/directory/containing/my/repos
npm-multi-linker

Replace all dependencies of a given module in the current directory by links to modules in current directory

cd path/to/directory/containing/my/repos
npm-multi-linker -p my-package

Replace all dependencies of a given module in directory dir1 by links to modules in directory dir2

npm-multi-linker -p path/to/dir1/my-module -s path/to/dir2

Run npm install before linking

This is handy when you just cloned your repositories but did not install.

cd path/to/directory/containing/my/repos
npm-multi-linker -i

Undo linking

Side use: This can also be used if you never linked before. It just runs npm install in all packages.

cd path/to/directory/containing/my/repos
npm-multi-linker -u
0.1.9

4 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago