AngularJS生成器:在index.html中生成的脚本列表顶部的'jquery.js'

时间:2015-10-22 11:11:03

标签: jquery angularjs gruntjs bower yeoman-generator-angular

我正在使用AngularJS生成器并且非常高兴它,但我遇到了自动生成脚本的问题:当我添加Bootstrap时,'grunt serve'任务正在index.html中生成脚本使用jquery.js:

<!-- build:js(.) scripts/vendor.js -->
<!-- bower:js -->
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/angular-cookies/angular-cookies.js"></script>
<script src="bower_components/angular-simple-logger/dist/angular-simple-logger.js"></script>
<script src="bower_components/lodash/lodash.js"></script>
<script src="bower_components/angular-google-maps/dist/angular-google-maps.js"></script>
<script src="bower_components/angular-resource/angular-resource.js"></script>
<script src="bower_components/angular-route/angular-route.js"></script>
<script src="bower_components/angular-sanitize/angular-sanitize.js"></script>
<script src="bower_components/angular-touch/angular-touch.js"></script>
<script src="bower_components/angular-ui-router/release/angular-ui-router.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.js"></script>
<script src="bower_components/angular-ui-grid/ui-grid.js"></script>
<script src="bower_components/isteven-angular-multiselect/isteven-multi-select.js"></script>
<script src="bower_components/angular-wizard/dist/angular-wizard.min.js"></script>
<script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.js"></script>
<!-- endbower -->
<!-- endbuild -->

这确实是一个问题,因为一些角度组件与它发生冲突。

{
  "name": "sms-app",
  "version": "0.0.0",
  "dependencies": {
    "angular": "^1.3.0",
    "angular-cookies": "^1.3.0",
    "angular-google-maps": "~2.2.1",
    "angular-resource": "^1.3.0",
    "angular-route": "^1.3.0",
    "angular-sanitize": "^1.3.0",
    "angular-touch": "^1.3.0",
    "angular-ui-router": "~0.2.15",
    "bootstrap": "^3.2.0",
    "angular-ui-grid": "~3.0.6",
    "isteven-angular-multiselect": "angular-multi-select#~4.0.0",
    "angular-wizard": "~0.5.5",
    "angular-bootstrap": "~0.14.2"
  },
  "devDependencies": {
    "angular-mocks": "^1.3.0"
  },
  "appPath": "app",
  "moduleName": "smsApp",
  "overrides": {
    "bootstrap": {
      "main": [
        "less/bootstrap.less",
        "dist/css/bootstrap.css",
        "dist/js/bootstrap.js"
      ]
    }
  }
}

如您所见,我的bootsrap.js是最后一次随叫随到。

谢谢!

0 个答案:

没有答案