Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Print out Grunt.js config during the build

I'd like to really learn how Grunt is working and be able to debug it later. How do I print out all of the configuration Grunt has at a given time? I'd like to see the merging of .initConfig, the package file, and any task level configuration.

like image 232
SimplGy Avatar asked Apr 24 '13 15:04

SimplGy


1 Answers

You can print out the grunt configuration by setting up a grunt task like this:

grunt.registerTask('printConfig', function() {
  grunt.log.writeln(JSON.stringify(grunt.config(), null, 2));
});
like image 199
SimplGy Avatar answered Sep 27 '22 18:09

SimplGy