Grunt usemin 找不到目标

Grunt usemin getting no targets found

我遵循了以下教程: https://www.youtube.com/watch?v=gIbfDxF69c8

并继续找不到 "usemin" 个目标。

gruntfile.js: http://www.billiving.com/demo/script/gruntfile.js

源文件: /script/app/index.html /script/app/js/file2.js

进程失败,生成的 index.html 不包含 link 缩小的 js 文件。

谢谢

你打错了,是 usemin: 而不是 usermin:

问题出在 usemin 路径中。我在详细模式下工作时能够弄清楚。这是我的最终输出:

module.exports = function(grunt) {
    grunt.initConfig({

    useminPrepare:{
          html: 'index.html',
          options:{
              dest:'build'
            }
    },

    usemin: {
      html: 'build/index.html'
     },



    copy :{

        task1: {expand: true, src: ['Partials/**', 'Nav/**', 'Resources/Images/**', 'Resources/packages/**', 'Resources/invoices/**', 
        'config.js', 'index.html', 'favicon.ico'], dest:'build/'},
    }       

});

grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-usemin');


grunt.registerTask('default',[
  'copy:task1',
  'useminPrepare',
  'concat',
  'uglify',
  'cssmin',
  'usemin'
]);



};