Reputation: 6263
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
I am getting
Running "cdnify:dist" (cdnify) task
Going through dist/404.html, dist/index.html to update script refs
>> No "cssmin" targets found.
Warning: Task "cssmin" failed. Use --force to continue.
Aborted due to warnings.
Which I dont know how to fix, or how to begin. Am I missing some configurations?
Configuration is now:
concat:
{ generated:
{ files:
[ { dest: '.tmp\\concat\\scripts\\scripts.js',
src:
[ '{.tmp,app}\\cdnjs.cloudflare.com\\ajax\\libs\\noUiSlider\\5.0.0\\jquery.nouislider.min.js',
.
<MY_LIBRARIES>,
.] },
{ dest: '.tmp\\concat\\scripts\\modules.js',
src:
[ 'app\\scripts\\app.js',
.
<MY_SOURCE_FILES>,
. ] } ] } }
uglify:
{ generated:
{ files:
[ { dest: 'dist\\scripts\\scripts.js',
src: [ '.tmp\\concat\\scripts\\scripts.js' ] },
{ dest: 'dist\\scripts\\modules.js',
src: [ '.tmp\\concat\\scripts\\modules.js' ] } ] } }
cssmin:
{}
Running "concurrent:dist" (concurrent) task
Running "imagemin:dist" (imagemin) task
? app/images/yeoman.png (saved 9.06 kB)
Minified 1 image (saved 9.06 kB)
Done, without errors.
Running "svgmin:dist" (svgmin) task
Done, without errors.
Running "compass:dist" (compass) task
directory .tmp/styles/
create .tmp/styles/bootstrap.css (1.739s)
create .tmp/styles/main.css (0.129s)
create .tmp/styles/problem-comprehension.css (0.002s)
create .tmp/styles/problem-timedword.css (0.002s)
create .tmp/styles/track-detail.css (0.009s)
Compilation took 1.894s
Done, without errors.
Running "autoprefixer:dist" (autoprefixer) task
Prefixed file ".tmp/styles/bootstrap.css" created.
Prefixed file ".tmp/styles/main.css" created.
Prefixed file ".tmp/styles/problem-comprehension.css" created.
Prefixed file ".tmp/styles/problem-timedword.css" created.
Prefixed file ".tmp/styles/track-detail.css" created.
Running "concat:generated" (concat) task
File ".tmp\concat\scripts\scripts.js" created.
File ".tmp\concat\scripts\modules.js" created.
Running "ngmin:dist" (ngmin) task
ngminifying .tmp/concat/scripts/modules.js, .tmp/concat/scripts/scripts.js
Running "copy:dist" (copy) task
Created 699 directories, copied 1980 files
Running "cdnify:dist" (cdnify) task
Going through dist/404.html, dist/index.html to update script refs
>> No "cssmin" targets found.
Warning: Task "cssmin" failed. Use --force to continue.
Aborted due to warnings.
Execution Time (2014-02-06 19:49:33 UTC)
clean:dist 1.3s ■■■■■■■■■■■ 8%
useminPrepare:html 169ms ■■ 1%
concurrent:dist 5.3s ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 33%
ngmin:dist 2.3s ■■■■■■■■■■■■■■■■■■■ 14%
copy:dist 6.8s ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 42%
Total 16.1s
Upvotes: 4
Views: 4573
Reputation: 497
you need add comments for build css files in your app like this
<!-- build:css(.) styles/vendor.css -->
<!-- Bootstrap -->
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
<!-- endbuild -->
<!-- build:css(.tmp) styles/main.css -->
<link rel="stylesheet" href="styles/styles.css">
<!-- endbuild -->
Upvotes: 1
Reputation: 5958
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!
Upvotes: 0
Reputation: 6263
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.
Upvotes: 3