after running the build from the /dist folder I get:
Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.2.1/$injector/modulerr?p
I will try to be brief explaining the problem when building with usemin 2.0.x and ngmin in Angularjs (according my experience, I may be wrong in something, if yes please correct me):
The normal flow in the Build grunt task is that ngmin is executed before usemin and others, to let the code with injections like this:
...
angular.module("Config",[])
.config(["$httpProvider","CONSTANTS","ERRORS","HEADERS",function(a,b,c,d){var
...
usemin 0.1.x was using only 'concat', but the version 2.0.x is using 'concat' and 'uglifyjs' so, after concatenate the code, it changes the javascript code again, this corrupts the ngmin, as you can see in the following example:
...
angular.module("Config",[])
.config(function(a,b,c,d){var
...
So you have to stop it defining the flow in useminPrepare, like the following:
useminPrepare: {
html: '<%= yeoman.app %>/index.html',
options: {
dest: '<%= yeoman.dist %>',
flow: {
steps: {'js': ['concat']},
post: {}
}
}
},
Edit You can add the task in the grunt tasks:
grunt.registerTask('build', [
'clean:dist',
'jshint',
'useminPrepare',
'imagemin',
'cssmin',
'ngmin',
'uglify',
'rev',
'usemin'
])
Hope it helps!