List grunt.js tasks

こ雲淡風輕ζ 提交于 2019-12-03 06:26:05

问题


I'm trying to work out how to print a list of all available grunt tasks. With rake it would be:

$ rake -T

What's the equivalent for grunt? e.g.

$ grunt -T

  • concat
  • jasmine
  • minify

回答1:


grunt --help lists available tasks.




回答2:


Workaround for the list in sh/bash in case you need to trigger something and can't modify the original code:

grunt -h --no-color | sed -n '/^Available tasks/,/^$/ {s/^  *\([^ ]\+\)  [^ ]\+.*$/\1/p}'


来源:https://stackoverflow.com/questions/15004624/list-grunt-js-tasks

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!