最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Print out Grunt.js config during the build - Stack Overflow

programmeradmin0浏览0评论

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.

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.

Share Improve this question asked Apr 24, 2013 at 15:58 SimplGySimplGy 20.4k15 gold badges111 silver badges150 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 21

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));
});
发布评论

评论列表(0)

  1. 暂无评论