gruntjs/grunt-contrib-concat

"grunt-contrib-concat": "^1.0.1" Running "concat" task in infinite loop

Vijendra07Kulhade opened this issue · 2 comments

Below is my gruntfile.js

When I am running grunt concat --verbose
It is going in infinite loop and nothing happens.

module.exports = function(grunt) {
    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),
        bowercopy: {
          options: {
            srcPrefix: 'bower_components'
          },
          scripts: {
            options: {
              destPrefix: 'jslib'
            },
            files: {
              'jquery/jquery.js': 'jquery/dist/jquery.js',
              'bootstrap/':'bootstrap/dist/',
            }
          }
        },
        concat: {
          options: {
            separator: ';\n'
          },
          dist: {
            src: ['jslib/','jssrc/'],
            dest: 'build/<%= pkg.name %>.js',
          }
        },
        //minification
        uglify: {
          options: {
            banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
          },
          build: {
            src: 'build/<%= pkg.name %>.js',
            dest: 'build/<%= pkg.name %>.min.js'
          }
        }
    });

    grunt.loadNpmTasks('grunt-contrib-concat');
    grunt.loadNpmTasks('grunt-contrib-uglify');
    grunt.loadNpmTasks('grunt-bowercopy');



    grunt.registerTask('bower',['bowercopy']);
    grunt.registerTask('concat',['concat']);
    grunt.registerTask('uglify',['uglify']);


    grunt.registerTask('default',['concat','uglify']);

};

@Vijendra07Kulhade

**First, sorry for my bad english (I speak spanish).

It happens exactly the same, in my case it repaired by changing the name of a different task .

Before:
grunt.registerTask('concat',['concat']); -->this generated an infinite loop

After:
grunt.registerTask('concatTask',['concat']); -->This worked me correctly!