涼亭依賴
要自動安裝涼亭及其元件,必須
-
在
package.json中指定 bower 依賴項:"dependencies": { "bower": "^1.7.9" } -
使用
scripts執行postinstall命令"scripts": { "postinstall": "./node_modules/bower/bin/bower install" } -
建立
.bowerrc檔案以設定要安裝的 bower_components 的目錄。否則 bower_components 將安裝在根目錄中。{ "directory" : "app/bower_components" }
現在,Heroku 在 npm install 之後自動執行 bower install 命令