假设我想安装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