使用Npm从github安装特定的分支 [英] Install specific branch from github using Npm

查看:649
本文介绍了使用Npm从github安装特定的分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的项目中使用npm安装github中的bootstrap-loader目前他们正在维护这个项目的两个版本,它们与webpack版本1可兼容, 2。



我想安装版本 1个。我应该用什么npm命令来安装它?



我试过使用下面的一个,但它不起作用。

  npm install git://github.com/shakacode/bootstrap-loader.git [#v1]  - 保存


解决方案

在您尝试的命令中有额外的方括号。



从<$ c $安装最新版本c> v1 分支,您可以使用:

  npm install git://github.com/ shakacode / bootstrap-loader.git#v1  - 保存


I would like to install bootstrap-loader from github in my project using npm

Currently they are maintaining two version of this project which are comaptible with webpack version 1 and 2.

I would like to install version 1. What npm command I should use to install this?

I tried using below one but it is not working.

npm install git://github.com/shakacode/bootstrap-loader.git[#v1] --Save 

解决方案

There are extra square brackets in the command you tried.

To install the latest version from the v1 branch, you can use:

npm install git://github.com/shakacode/bootstrap-loader.git#v1 --save

这篇关于使用Npm从github安装特定的分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆