假設我想安裝jQuery UI。我做的命令bower install jquery-ui
和涼亭將下載:下載完成後涼亭和文件夾結構
.
├── bower_components
│ ├── jquery
│ │ ├── dist
│ │ │ ├── jquery.js
│ │ │ └── jquery.min.js
│ │ └── src
│ └── jquery-ui
│ ├── themes
│ │ ├── smoothness
│ │ │ ├── jquery-ui.css
│ │ │ └── jquery-ui.min.css
│ │ └── [The rest of jQuery UI's themes]
│ ├── ui
│ │ ├── accordion.js
│ │ ├── autocomplete.js
│ │ └── ...
│ ├── jquery-ui.js
│ └── jquery-ui.min.js
└── index.html
後,包括在我的index.html文件我不得不寫類似bower_components/jquery/dist/jquery.min.js
,bower_components/jquery-ui/jquery-ui.min.js
和bower_components/jquery-ui/themes/smoo...
的CSS等
我習慣用一個更簡單的文件夾結構的工作,像這樣:
.
├── css
│ ├── main.css
│ └── slider.css
├── js
│ ├── jquery.min.js
│ └── jquery-ui.min.js
├── index.html
├── contact.html
└── pricing.html
我想知道是否有什麼辦法可以讓涼亭自動下載dist
文件到我的css, js
文件夾,無論我正在安裝什麼?
使用wiredep,你可以在bower.json指定覆蓋,和您的文件由wiredep自動添加到您的網頁 「覆蓋」:{ 「引導」:{ 「主」: 「少/ bootstrap.less 「 」DIST/CSS/bootstrap.css「, 」DIST/JS/bootstrap.js「 ] }, 」角toastr「:{ 」主「:[ 」 DIST /角-toastr.css「, 」dist/angular-toastr.js「, 」dist/angular-toastr.tpls。js「 」 } } – sawe