Yeoman 教程缺少样式
Yeoman tutorial missing styling
我正在尝试通过 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">
...
评论中的内容,例如 build:css
,是否意味着我应该在命令行上执行某些操作?教程没有提到任何东西。
main.css 文件看起来不错,而且看起来它包含 CSS 我需要的东西,比如 .jumbotron { ... }
。此外,bower 目录包含一个 "bootstrap" 子目录,其中有很多看起来很有前途的 CSS,但本教程也没有提及任何相关内容。本教程似乎假设 the first launch should look great already, here...
我确定我已经完成了到目前为止的所有步骤。知道我错过了什么吗?
这 github issue 解决了我的问题。底部的答案 waaaay 建议执行以下操作:
$ bower install --save bootstrap#3.3.4
然后是
$ grunt wiredep
如果它能解释这些东西的含义,那将是一个更好的答案。
我正在尝试通过 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">
...
评论中的内容,例如 build:css
,是否意味着我应该在命令行上执行某些操作?教程没有提到任何东西。
main.css 文件看起来不错,而且看起来它包含 CSS 我需要的东西,比如 .jumbotron { ... }
。此外,bower 目录包含一个 "bootstrap" 子目录,其中有很多看起来很有前途的 CSS,但本教程也没有提及任何相关内容。本教程似乎假设 the first launch should look great already, here...
我确定我已经完成了到目前为止的所有步骤。知道我错过了什么吗?
这 github issue 解决了我的问题。底部的答案 waaaay 建议执行以下操作:
$ bower install --save bootstrap#3.3.4
然后是
$ grunt wiredep
如果它能解释这些东西的含义,那将是一个更好的答案。