If you are not doing very high level programming in GruntJS, I think you can register a cyclic task.
If you name the task the same name as the plugin, it will work endlessly:
grunt.registerTask('uglify', ['uglify'])
This leads to the challenge of the task itself.
To check what you are doing, run grunt with the --verbose (or --v) command to find out what grunt is.
For example, run grunt uglify --v and notice how many times it runs. This can be easily fixed by changing the task name to something else.
If, however, you are sure that you are running run grunt with --max-stack-size=10000 or something else ...
source share