虽然 bee 习惯使用 Rakefile、Cakefile 和 Jakefile,但它们都有一些列出可用任务的便捷方式。
喜欢
jake -T
jake db:dump # Dump the database
jake db:load # Populate the database
..等等
甚至过滤 “jake -T dum”,只显示“jake db:dump”任务。
那么,有没有办法使用 grunt 来做同样的事情? 我正在考虑创建一个默认任务来迭代整个 grunt 配置对象并通过 console.log 将其写入标准输出,但是有人知道更好的方法吗?
谢谢。
最佳答案
grunt --help 列出可用任务,如下 answer .
示例输出
.....
Available tasks
clean Clean files and folders. *
jade Compile jade templates. *
web_server A Web Server similar to Python's SimpleHTTPServer, with
Cross-Origin Resource Sharing and No-Cache options. *
关于javascript - Grunt (node) - 如何显示可用任务?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14150039/