bower_install用法,bowerinstall

來源:互聯網
上載者:User

bower_install用法,bowerinstall
bower install

功能: 安裝項目依賴的包

文法:

$ bower install [<options>]$ bower install <endpoint> [<endpoint> ..] [<options>]

端點(endpoint)可以是如下形式:

  • <package>
  • <package>#<version>
  • <name>=<package>#<version>

說明:

  • <package>可以是一個包的URL連結地址,本地地址或者註冊的包名
  • <version>是包的有效版本號碼範圍中的一個值
  • <name>是指定的當地套件名

<package>可以是如下任何一種形式

  • 註冊的包名:如jquery,angular-animate

  • Git版本庫地址: 如https://github.com/jquery/jquery.git

  • Git版本庫地址,省略.git:如https://github.com/jquery/jquery

  • 當地套件所在檔案夾地址: my/local/folder/

  • 公開的svn版本庫地址:svn+http://package.googlecode.com/svn/

  • 私人的svn版本庫地址:svn+ssh://package.googlecode.com/svn/,
    svn+https://package.googlecode.com/svn/

  • URL地址:
    http://example.com/script.js
    http://example.com/style.css

<version>版本號碼可以是

  • 確定的版本號碼:#1.2.3
  • 版本號碼範圍: #1.2,#~1.2.3,#^1.2.3,#>=1.2.3 <2.0

<options>介紹

  • -F,或者--force-latest: 暫無
  • -P,或者--production: 不在devDependencies中添加該包名
  • -S,或者--save: 在項目根目錄下的’bower.json’檔案中的dependencies欄位中添加該包名作為項目依賴
  • -D,或者--save-dev: 在項目根目錄下的’bower.json’檔案中的dependencies欄位和devDependencies欄位添加該包名作為項目依賴
  • -E,或者--save-exact: 暫無

一個例子:

dulin@IT01010030921 /e/website/jquery-plugins (master)$ bower uninstall jquery -Dbower conflict      jquery-ui depends on jquery? Continue anyway? Yesbower uninstall     jquerydulin@IT01010030921 /e/website/jquery-plugins (master)$ bower cache listjquery=git://github.com/jquery/jquery.git#2.1.4dulin@IT01010030921 /e/website/jquery-plugins (master)$ bower install jquery --offline -Pbower jquery#>=1.6              cached git://github.com/jquery/jquery.git#2.1.4bower jquery#~2.1.4             cached git://github.com/jquery/jquery.git#2.1.4bower jquery#*                  cached git://github.com/jquery/jquery.git#2.1.4bower jquery#>=1.6             install jquery#2.1.4jquery#2.1.4 bower_components\jquery

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.