npm link

符号链接包文件夹

概要

npm link (in package dir)
npm link [<@scope>/]<pkg>[@<version>]

alias: npm ln

描述

包链接是一个两步过程。

首先,包文件夹中的 npm link 将在全局文件夹 {prefix}/lib/node_modules/<package> 中创建一个符号链接,链接到执行 npm link 命令的包。它还将包装中的任何垃圾箱链接到 {prefix}/bin/{name}。请注意,npm link 使用全局前缀(参见 npm prefix -g 的值)。

接下来,在某个其他位置,npm link package-name 将创建一个从全局安装的 package-name 到当前文件夹的 node_modules/ 的符号链接。

请注意,package-name 取自 package.json,而不是目录名称。

7sKufXyPCuCE/X0KCBLk/3aO9gAMyduakbXcnUqgiIP3G4UF3r59CMLLHchH4rTLdoQyeK8nMns8XoGH/o1i/pfqq+4G8+FBtgmKMNWFQkOPR4gS0OptHgFQfiK6I6QJEyPkOY5mTH6BtueXhaaUVdEIiYnIS46rbu2uHxhflbUBdJNe5+8a8gYE1FCqXh/xx62qKJh0c2WR8jgywpIMH1ShI8Ul3hu0KxIIBkdvKqI=

HbRccbdH4nADJc47DN6X5CiouXhUCqcR/doMPSYLC4Y/pu31EWX0Fm7Oi1xYhUXjn69yuZIAM+MBOOaQO++xPdZBSoJ4L4ZjY3BJjc5x5TDN1QkidXLwdNscLd+wKh+EXejJI5dz52yGuwAzYWUyUZgO3QmmzXc75Hf68GapnaKn5EmocYyBdsUmrjKK+da0

Jmm8zCEzHV4rWF9mLdekWpICkegQAPa6yG9d5IbF6slipA2mmYpEvVzG9mjqKHH7eu2fVV+6/YIppcWY1nns2mvRTcBsXngnwG48rBptSJ0QzCcBISDn1qkO+3vgKKAW1WAcZtPeHNRF/9Y5/XqzS/Y0Fp/n4oNJgvAo29B/t/OCmjYNDu0Y/ys9eoegRs7n

60UMxSoViWyh6aKkPoRIiQ==

    cd ~/projects/node-redis    # go into the package directory
    npm link                    # creates global link
    cd ~/projects/node-bloggy   # go into some other package directory.
    npm link redis              # link-install the package

3gNlU+At19pbrNW7Mh2neCXMXS7SncscD1pHcEE3FfKAidX6iCY0EtFYiwdB7olVq0w4v15GZUp/Eqmo8Nh7rL8lsFhUs+TBqgQbdtyI0A25tthjLZTTNRk5Zdx8wIvLJTFTQw9e3n7ayJ0vDd+1EWwYyW4TUTPhCuD95XINPRmr0zf2yDBhm5p8oLXBYTJPUMNnK0+vVP0leNdIlN1+Npzd5wjZdFglzWJxhw9yBN5GUC0//uNfTX8fD5FWUvguAs2TlqaKmJzQqh1QMWN9Kw==

ZKGHr/A0Xdt3rJuLjdXrfxPqKpmmXFXr9VIy4n9qQG6k1wDZUfZlDF294DCASDnkwrwEYl1F1zUNFGEJk1QSvXMv72skDUjXoHVUfpVHV/EIkQJiCDJCzUAYKGfOsmyR

cd ~/projects/node-bloggy  # go into the dir of your main project
npm link ../node-redis     # link the dir of your dependency

Fc2o4fdh5I0AstsC4PnV3HWqIJJm93+Euv6SsV6fCiw=

(cd ../node-redis; npm link)
npm link redis

Ne8PuALRuz6mF/hBko4YVtGhZVtYQ+s9gqG564Ctk1T9KMqUG7L5OS420AheQFOjR/iHAB5hfLLZHK4DiueBrvDJ0K1uWeMh1QAh5WlorIxpWphGtd/2TrBg/wIPcH7HnTqI4HxLozKVoKYKi1nujFLhtlIhXqbHwTgwOT0QyDU=

2JHQufKWAjUXwg22nM1PdJ7mH0NE/u52TxYdQv50t8hF6B7Ho2Jj0EmffHu7NYnZIGsNiepIYEiAEdB6nuKuJr/XGqRostRL2jMIfaOzTu3OoVYiREpu3ptHd+YAceiSuFKNsnZLWHaVKRgomSAn+LIYDQula7BgnIOOhhoIbqs=

70jEYVkrAWlANkVf03sYnD0b06Y/Ra9n64oaR1hp0WnFigb9QnE7AHA9Y+j7QR51n5X6tl3rK4iNeCGP0kFg6tDktGKrH6Wd81zaYXdFUo7ysiJRcerQorbBZC3f79wPc/A3C3pQ/5OEFy41TlErQQXDUrBNvb9y8lrxQysuUHA9l9IuW252s/zDoPdLcakLIAy3x3+eg3yAI71X/c211cBWw+/124/XFGIdu9SVJ8E=

npm link @myorg/privatepackage