It is some times convenient, even necessary, to make use of a module that you are working on before it has been published to the node package manager (npm). The npm link command makes this simple. For example: upper/index.js: module.exports = functio
We will import our newly published package into a new project locally to make sure everything is working as expected. We can do this locally before publishing with npm link. This creates a symbolic link in our node_modules folder, so our unpublished
我们在把包发布到npm上时,如果需要对本地的包进行修改,我们需要改变一个版本,重新发布.然后测试时需要更新这个包进行测试.这样的话,每一次的调试都特别麻烦.我们可以使用npm link来加速这个调试过程. 步骤1:在项目根目录下运行npm link npm link 步骤2:在项目之外使用到这个包的根目录下运行npm link xxx npm link + 包的名称 步骤3: 当项目中进行了修改时,项目外就能够获得最新的代码了. 原文地址:https://www.cnblogs.com/yinh
章节目录 概述 name version description keywords homepage bugs license 和用户相关的属性: author, contributors files main bin man directories directories.lib directories.bin directories.man directories.doc directories.example repository scripts config dependencies U