npm-junction
Alternative NPM link/unlink command line interface (CLI) scripts for NPM unsupported Windows (XP,2000,2003) using SysInternals Junction.
Getting started
Install npm-junction
globally and you'll have access to the nlink
& nunlink
commands anywhere on your Windows system.
npm install -g npm-junction
nlink
command/script
Creates a junction/symlink for the current directory or module (if a package.json
exists) into the NPM global prefix [1] or a reverse link for the specified module [2]
Usage:
- [1] nlink - create a symlink for the
[current directory]
or module (if a package.json
exists) under NPM global prefix - [2] nlink module - create a symlink into
[current directory]/node_modules/[module]
from the [module] link in NPM global prefix
nunlink
command/script
Unlink the junction/symlink for the current directory or module (if a package.json
exists) from the NPM global prefix [1] or a remove a local link for the specified module [2]
Usage:
- [1] nunlink - delete the module symlink for the
[current directory]
or module (if a package.json
exists) from the NPM global prefix - [2] nunlink module - delete the symlink from
[current directory]/node_modules/[module]
nlink
& nunlink
commands/scripts usage in modules package.json
script/hooks
"scripts": {
"postinstall": "nlink",
"preinstall": "nunlink module",
"postinstall": "nlink module"
},
npm-junction changelog
- Add current module name extraction from package.json
- Update documentation with package.json script/hooks linking/unlinking