標籤:連結 version 瀏覽器 檢查 依賴 本地 註冊 tar 類庫
bower安裝使用以及git安裝
bower需要:node 和 git
1、Git安裝:(選擇第二項:Use Git from the Windows Command Prompt)
2、node安裝:
3、確定,配置完畢,
開啟cmd,輸入node -v ,node -v ,v是version的意思,檢查一下版本號碼,校正是否裝成功了
4、安裝bower:npm install -g bower。
npm 是 node package manager 的意思 , node js 使用 npm 是管理依賴的包(也就是js類庫)
5、安裝weui:bower install --save weui
6、開發
git clone https://github.com/weui/weui.git
cd weui
npm install -g gulp
npm install
npm start 或者gulp -ws
7、bower 的常用命令簡介:
cache:bower緩衝管理
help:顯示Bower命令的協助資訊
home:通過瀏覽器開啟一個包的github發布頁
info:查看包的資訊
init:建立bower.json檔案
install:安裝包到項目
link:在本地bower庫建立一個項目連結
list:列出項目已經安裝的包
lookup:根據包名查詢包的URL
prune:刪除項目無關的包
register:註冊一個包
search:搜尋項目的包
update:更新項目的包
uninstall:刪除項目的包
查看已安裝的庫例表:bower list
更新某個庫:bower update
8、常見錯誤處理
(1)、npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
處理方法:
(2)、npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to [email protected]^4.0.0 as soon as possible. Use ‘npm ls graceful-fs‘ to find it in the tree.
處理方法:
bower安裝使用、git安裝、node安裝、weui安裝開發