Errors While Running Grunt Build For The First Time
I created an angularJS project using Yeoman Previewing the app using grunt serve works well. The server starts and I can browse my pages successfully. When executing grunt build
Solution 1:
Yeoman out of the box configuration requires some tweaking. cssmin is part of the build task while it commented out. Since 'usemin' is listed later I just removed it from task.
Solution 2:
you need add comments for build css files in your app like this
<!-- build:css(.) styles/vendor.css --><!-- Bootstrap --><linkrel="stylesheet"href="bower_components/bootstrap/dist/css/bootstrap.min.css"><!-- endbuild --><!-- build:css(.tmp) styles/main.css --><linkrel="stylesheet"href="styles/styles.css"><!-- endbuild -->
Solution 3:
If you look at the Gruntfile.js it also say this at a certain point:
// By default, your `index.html`'s <!-- Usemin block --> will take care
// of minification. These next options are pre-configured if you do not
// wish to use the Usemin blocks.
So you leave the block in the HTML or you uncomment in the Gruntfile.js! Took me a while to figure it out since I cleaned up my HTML immediatly, but it works like a charm now!
Post a Comment for "Errors While Running Grunt Build For The First Time"