Grunt usemin not working with scripts inside app folder

My grunt usemin is not working for my javascripts that is on app/scripts only for scripts outside app folder, like bower. What I mean is, usemin is not uglify my app/scripts:

Here is my GruntFile: http://pastebin.com/7jV9mipH

Please someone could help me?

SOLUTION

I figure out how to resolve my problem:

I just put the base path to my scripts folder at usemin comment block, like this:

<!-- build:js(app/) scripts/app.js -->

instead of:

<!-- build:js scripts/app.js -->

You see if you didn't include <!-- Usemin block --> in your .html file the usemin won't work.

  1. So either check the .html files
  2. Or uncomment the cssmin and uglify configuration. Which is currently turned off.

                usemin: {
                  html: ['<%= yeoman.dist %>/{,**/}*.html'],
                  css: ['<%= yeoman.dist %>/styles/{,**/}*.css'],
                  options: {
                    assetsDirs: ['<%= yeoman.dist %>','<%= yeoman.dist %>/images']
                  }
                },
    
                // The following *-min tasks will produce minified files in the dist folder
                // 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.
                // cssmin: {
                //   dist: {
                //     files: {
                //       '<%= yeoman.dist %>/styles/main.css': [
                //         '.tmp/styles/{,*/}*.css'
                //       ]
                //     }
                //   }
                // },
                // uglify: {
                //   dist: {
                //     files: {
                //       '<%= yeoman.dist %>/scripts/scripts.js': [
                //         '<%= yeoman.dist %>/scripts/scripts.js'
                //       ]
                //     }
                //   }
                // },
                // concat: {
                //   dist: {}
                // },
    

See this answer: grunt usemin doesnt affect the html file(index.html)

Just had this problem by myself and solvation was to convert all line endings into unix style line endings (lf) and avoid windows line endings in any file used by usemin