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

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

问题描述

我想使用 npm 在我的项目中从 github 安装 bootstrap-loader

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

目前他们正在维护这个项目的两个版本,它们与 webpack 版本 1 和 2 兼容.

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

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

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.

要从 brach-name 分支安装最新版本,您可以使用:

To install the latest version from the brach-name branch, you can use:

npm install "https://github.com/shakacode/bootstrap-loader.git#branch-name" --save

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

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