这让我疯狂.到目前为止,Bower Grunt(通过Yeoman)一直是沮丧和浪费时间的主要来源.所有我想要的是我的应用程序使用最新的(2.1.0)版本的
jquery.
bower列表正确报告了jquery 2.1.0作为官方更新.
我运行bower install –save jquery来更新到最后一个版本.
bower list命令现在可以正确地报告jquery#2.1.0作为依赖关系
bower.json文件现在正确地列出了需要版本的jquery作为依赖:
- {
- "name": "xxx","version": "0.0.0","dependencies": {
- ...
- "angular": "1.2.13","jquery": "~2.1.0","sizzle": "1.10.16","bootstrap": "~3.0.3",...
但是,每次运行grunt构建或grunt服务时,都会提供< script src =“bower_components / jquery / dist / jquery.js”>< / script>列表从index.html中删除,从而阻止整个应用程序运行.
- #> grunt serve
- Running "serve" task
- Running "clean:server" (clean) task
- Cleaning .tmp...OK
- Running "bower-install:app" (bower-install) task
- jquery was not injected in your file.
- Please go take a look in "app/bower_components/jquery" for the file you need,then manually include it in your file.
- Running "concurrent:server" (concurrent) task
- ...