I have installed grunt and trying the grunt-react
and grunt-contrib-imagemin
tasks. I have setup the following Gruntfile.js
.
module.exports = function(grunt) {
grunt.initConfig ({
imagemin: {
dynamic: {
files: [{
expand: true,
cwd: 'public',
src: ['development/images/*.{png,jpg,gif}'],
dest: 'images'
}],
options: {
cache: false
}
}
},
react: {
single_file_output: {
files: {
'bundle.jsx': 'login.jsx'
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-imagemin');
grunt.loadNpmTasks('grunt-react');
grunt.registerTask('imagemin', ['imagemin']);
grunt.registerTask('react', ['react']);
};
From the command line, I start the tasks as grunt react
or grunt imagemin
. After passing a --verbose
CLI flag, Grunt
reports that all checks were OK
. Yet both the tasks runs indefinitely. They never end. Please help me.
Here is my Grunt version info:
grunt-cli v0.1.13
grunt v0.4.5
Here is the command line output:
Running "react" task
This is repeatedly printed with the --verbose
flag.
I was able to get it work, by changing the following:
grunt.registerTask('reactify', ['react']);
I changed the name of the tasks. I think due to a cyclic nature of the internal design, it causes indefinite execution.