虽然过去常常使用Rakefile,Cakefile和Jakefile,但它们都有一些方便的列出可用任务的方法.
喜欢
jake -T
jake db:dump # Dump the database
jake db:load # Populate the database
Run Code Online (Sandbox Code Playgroud)
..等等.
甚至过滤"jake -T dum",只显示"the jake db:dump"任务.
那么,有没有办法使用grunt做同样的事情?我在考虑创建一个默认任务,迭代整个grunt配置对象并通过console.log将其写入stdout,但有人知道更好的方法吗?
谢谢.