Yeoman, grunt和bower:可以在没有javascript文件的情况下安装bootstrap



我使用bower install bootstrap安装bootstrap

我正在使用grunt来构建我的项目。我正在尝试添加bootstrap并排除bootstrap.js文件。

// Automatically inject Bower components into the app
wiredep: {
  options: {
    cwd: '<%= yeoman.app %>'
  },
  app: {
    src: ['<%= yeoman.app %>/index.html'],
    exclude: ['bower_components/bootstrap/dist/js/bootstrap.js'],
    ignorePath:  /..//
  }
}

然而bower_components/bootstrap/dist/js/bootstrap.js总是包括在内。

如何排除bootstrap javascript文件?

似乎exclude: ['bootstrap.js']解决了我的问题。然而,这不是很清楚的文档…

最新更新