List grunt.js tasks

后端 未结 2 1970
迷失自我
迷失自我 2021-02-02 04:46

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.

相关标签:
2条回答
  • 2021-02-02 05:37

    grunt --help lists available tasks.

    0 讨论(0)
  • 2021-02-02 05:41

    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}'
    
    0 讨论(0)
提交回复
热议问题