How to give a custom url in package.json for a package

隐身守侯 提交于 2019-12-08 09:11:53

问题


I have done customization in a npm package inside node_modules folder. Now I want to deploy it on heroku. But what heroku does is It will see the package.json and install the fresh package.

So someone suggested me to provide the custom url for a npm package, So that Heroku will download the npm package from this custom url not from npm.

How can I achieve the same?


回答1:


You should fork this package, make customization on your fork and install your version as a project dependency npm install <git repo url>

  1. find package that you want to customise on github
  2. use fork button to fork it to your repositories
  3. make customization on this new repo created in step 2
  4. run npm install with url address to your repository


来源:https://stackoverflow.com/questions/55625458/how-to-give-a-custom-url-in-package-json-for-a-package

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!