【问题标题】:Yeoman tutorial missing stylingYeoman 教程缺少样式
【发布时间】:2016-05-17 19:17:14
【问题描述】:

我正在尝试通过 Yeoman 提供的 this getting started tutorial。它应该使用 bootstrap css 进行样式设置,但初始启动看起来像这样:

我是新手,但我认为这表明缺少 CSS。索引文件开始是这样的......

<!doctype html>
<html class="no-js">
  <head>
    <meta charset="utf-8">
    <title></title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width">
    <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
    <!-- build:css(.) styles/vendor.css -->
    <!-- bower:css -->
    <!-- endbower -->
    <!-- endbuild -->
    <!-- build:css(.tmp) styles/main.css -->
    <link rel="stylesheet" href="styles/main.css">
    <!-- endbuild -->
  </head>
  <body ng-app="mytodoApp">
...

cmets 中的东西,比如build:css,是不是意味着我应该在命令行上做点什么?本教程没有提及任何内容。

main.css 文件看起来不错,并且看起来它包含我需要的 CSS 内容,例如 .jumbotron { ... }。此外,bower 目录包含一个“bootstrap”子目录,其中包含许多看起来很有前途的 CSS,但本教程也没有提及任何关于此的内容。本教程似乎假设the first launch should look great already, here...

我确定我已经完成了到目前为止的所有步骤。知道我错过了什么吗?

【问题讨论】:

    标签: css twitter-bootstrap yeoman yeoman-generator


    【解决方案1】:

    github issue 解决了我的问题。底部的答案 waaaay 建议执行以下操作:

    $ bower install --save bootstrap#3.3.4
    

    然后

    $ grunt wiredep
    

    如果能解释这些事情的含义,那将是一个更好的答案。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-12
      • 1970-01-01
      • 1970-01-01
      • 2017-08-27
      • 2016-10-20
      相关资源
      最近更新 更多