简体   繁体   中英

Grunt is deleting my CSS files when I run it

I used bower to install the 'font-awesome' css package. I then added the bower components path to my html as such:

<!-- 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" />
<link rel="stylesheet" href="bower_components/animate.css/animate.css" />
<link rel="stylesheet" href="bower_components/bootstrap-duallistbox/src/bootstrap-duallistbox.css" />
<link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.min.css" />
<!-- endbower -->
<!-- endbuild -->
<!-- build:css(.tmp) styles/main.css -->

When I run grunt serve the font-awesome stylesheet disappears!

I am doing an angular project that was scaffolded by yeoman.

So I found a solution. That section of HTML is automatically populated by bower and grunt when the build runs. For whatever reason, font-awesome does not populate that area. Instead, I used components-font-awesome: bower install components-font-awesome --save

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM