Using grunt registerTask targets

gruntjs

Solution

Your `build` task doesn't have a `debug` target. Your `uglify` task does. If you want your `build` task to run `uglify:debug` you would do:

` grunt.registerTask('build', ['uglify:debug']); `

Problem

In my `Gruntfile.js` I've got: ``` grunt.initConfig({ // ... uglify: { debug: { options: { mangle: false, compress: false, beautify: true } }, }, }); grunt.registerTask('build', [ //... 'uglify', //... ]); ``` I'd like to have ``` grunt build ``` Create a ugilified version of my js code using the defaults to the uglify task, and ``` grunt build:debug ``` create an un-mangled version of the same code, but the :debug option doesn't seem to have an impact -- it runs the uglify task with the default options. Any thoughts as to what I might be doing wrong?

Original source