怎样将本地包安装到全局

本文阅读大概需要 1 分钟
  1. In package directory
1
$ npm link

This createsa symlink to the current folder in npm’s global installation directory.

  1. Somewhere else, where you want to use the modules:
1
$npm  link <pkgname>

This will create a symlink in your project’s node_modules/ folder to the global installation.