如何使加载引导主题css

如何使加载引导主题css,css,angularjs,twitter-bootstrap,yeoman,yo,Css,Angularjs,Twitter Bootstrap,Yeoman,Yo,yo安装引导文件一切正常。此时,index.html文件如下所示: <!-- Place favicon.ico and apple-touch-icon.png in the root directory --> <!-- build:css(.) styles/vendor.css --> <!-- bower:css --> <link rel="stylesheet" href="bower_components/bootstrap/dist/c

yo
安装引导文件一切正常。此时,
index.html
文件如下所示:

<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<!-- build:css(.) styles/vendor.css -->
<!-- bower:css -->
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" />
<!-- endbower -->
<!-- endbuild -->
<!-- build:css(.tmp) styles/main.css -->
<link rel="stylesheet" href="styles/main.css">
<!-- endbuild -->

这不包括
bootstrap.theme.css
文件


添加此项的建议方式是什么?我是否手动进入并添加它?

手动将其添加到另一个
下面。css
包括是否在您的系统上本地可用(例如在
bower\u组件中/

如果文件在本地不可用,我会将其添加到
的正上方,否则它可能会破坏您的
grunt构建
和/或
grunt服务
,因为
bower
试图缩小文件

谷歌字体导入也一样,将它们放在
上方,否则
bower
将尝试缩小它(在
grunfile.js中的
htmlmin
选项下)


您可以阅读有关该主题的更多信息。

正确的方法是覆盖您的bower.json文件以加载引导依赖项,然后运行
grunt wiredep

bower.json
如下所示:

{
  "name": "frontend",
  "version": "0.0.0",
  "dependencies": {
    "angular": "^1.3.0",
    "json3": "^3.3.0",
    "es5-shim": "^4.0.0",
    "bootstrap": "^3.2.0",
    "angular-cookies": "^1.3.0",
    "angular-route": "^1.3.0",
    "angular-local-storage": "~0.1.5",
    "raty": "~2.7.0",
    "kineticjs": "~5.1.0"
  },
  "devDependencies": {
    "angular-mocks": "~1.3.0",
    "angular-scenario": "~1.3.0"
  },
  "appPath": "app",
  "overrides": {
    "bootstrap": {
      "main": [
        "less/bootstrap.less",
        "dist/css/bootstrap.css",
        "dist/css/bootstrap-theme.css",
        "dist/js/bootstrap.js",
        "dist/fonts/glyphicons-halflings-regular.eot",
        "dist/fonts/glyphicons-halflings-regular.svg",
        "dist/fonts/glyphicons-halflings-regular.ttf",
        "dist/fonts/glyphicons-halflings-regular.woff"
      ]        
    }
  }
}
来源:

执行以下操作

bower install bootstrap-css --save