2014-02-09 60 views
6

我使用Yeoman並嘗試使用grunt來構建和優化我的dist。Grunt CDNify不會CND化文件

我注意到cdnify:dist之後,我的index.html文件與之後的相同,仍然引用了本地的bower。

<script src="bower_components/angular/angular.js"></script> 

這一構建過程似乎傳遞OK:

Running "cdnify:dist" (cdnify) task 
Going through dist/404.html, dist/index.html to update script refs 

使用AngularJS 1.2.6,0.2.2 CDNify。

我bower.json似乎與guidelines

我這麼想線?還有其他的選擇嗎?

回答

4

這是帶有CDNify的reported issue。看起來google-cdn是硬編碼支持的版本,而Angular 1.2.x目前不支持。

Dan Smith (AKA X1011),通過使用grunt-htmlrefs手動更新腳本標記解決此問題。你可以看到他如何做in this commit他的邊緣移動賓果

+1

似乎還沒有完全解決。串接和縮小仍然是我想用供應商腳本執行的操作。丹·史密斯似乎採取了這些行動。 –