Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想真正了解 Grunt 是如何工作的,并能够在以后对其进行调试。如何打印出 Grunt 在给定时间的所有配置?我希望看到 .initConfig、包文件和任何任务级别配置的合并。
您可以通过设置如下 grunt 任务来打印 grunt 配置:
grunt.registerTask('printConfig', function() { grunt.log.writeln(JSON.stringify(grunt.config(), null, 2)); });