1

why I am getting can not read property summary of undefined error while I run grunt filerev_apply or grunt filerev_replace . And when I run grunt.filerev.summary It shows grunt.filerev.summary is not recognized as internal or external command.

Gruntfile.js

module.exports = function(grunt) {
    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),

          filerev: {
            options: {
              algorithm: 'md5',
              length: 8
            },          

            images: {
              src: ['views/common/abc.html'],
            }
          },

          filerev_replace: {
            options: {
              assets_root: 'views/common/abc.html'
            },
            compiled_assets: {
              src: 'views/common/abc.html'
            },
            views: {
              options: {
                views_root: 'views/'
              },
              src: 'views/**/*.html'
            }
          },

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

          usemin: {
            html: 'indexfolder/index.html',
            options: {
                dirs: ['views','views1'],
              assetsDirs: ['views','views1'],
              revmap: ''
            }
          },

          filerev_apply: {
              files: [
                {
                  //expand: true,
                  //cwd: 'views',
                  src: ['views/**/*.html'],
                  //dest: 'views'
                }
              ]
            },

        reload: {
            //port: 8000,
            proxy: {
                host: 'localhost',
                port: 80
            }
        },
        watch: {
            sass: {
              files: ['views/**/*.html'],
              tasks: ['reload'],
              options: {
                livereload: true,
              }
            }
        }
    });
        grunt.loadNpmTasks('grunt-usemin');
        grunt.loadNpmTasks('grunt-contrib-watch');
        grunt.loadNpmTasks('grunt-contrib-connect');
        grunt.loadNpmTasks('grunt-reload');
        grunt.loadNpmTasks('grunt-filerev');
        grunt.loadNpmTasks('grunt-filerev-apply');
        grunt.loadNpmTasks('grunt-filerev-replace');

    grunt.registerTask('default', ['usemin', 'useminPrepare', 'watch','connect', 'reload', 'filerev', 'filerev_apply', 'filerev_replace']);
};
Sunil Madan
  • 457
  • 1
  • 4
  • 17

0 Answers0