index.html in a yeoman project
Confusion about comments of index.html in a yeoman project

This post aim to give a brief explanation of some comments in index.html of a yeoman project.

1. comments for bower

<!-- - bower:css -->
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css">
<!-- - endbower -->

<!-- bower:js -->
<script src="bower_components/jquery/dist/jquery.js"></script>
<!-- - endbower -->

This kind of blocks is to help wiredep(click the link to learn more) to automatically put the dependencies code to the index.html file.

2. conments for usemin

<!-- build:js({.tmp,app,.}) scripts/vendor.js -->
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/moment/moment.js"></script>
<!-- endbuild -->

This kind of blocks is to help usemin(click the link to learn more) to determine which block of javascript files to be packaged and uglified.

3. comments for IE

<!--[if lt IE 9]>
<script src="bower_components/es5-shim/es5-shim.js"></script>
<![endif]-->

And this block will work when users’ IE browser version is less than 9.

*****
Written by Zhang Tao on 13 January 2016