Depend on a branch or tag using a git URL in a package.json?

前端 未结 5 1116
眼角桃花
眼角桃花 2020-11-29 15:49

Say I\'ve forked a node module with a bugfix and I want to use my fixed version, on a feature branch of course, until the bugfix is merged and released.

How would I

5条回答
  •  猫巷女王i
    2020-11-29 16:44

    On latest version of NPM you can just do:

    npm install gitAuthor/gitRepo#tag

    If the repo is a valid NPM package it will be auto-aliased in package.json as:

    { "NPMPackageName": "gitAuthor/gitRepo#tag" }

    If you could add this to @justingordon 's answer there is no need for manual aliasing now !

提交回复
热议问题