有没有办法列出 psake 构建文件中的所有任务?
我有一个包含多个任务的 default.ps1 文件,其中一些任务我并不经常使用。
有没有办法在命令行中列出它们,而不是打开文件并 grep 查找任务?理想情况下,附有一些描述(将设置在任务附近)。
我正在考虑类似于 rake 对 -t 所做的事情(参见 此处 例如)
I've got a default.ps1 file with several tasks, some of which I don't use all too often.
Instead of opening the file and grep'ing for the Tasks, is there a way to list them in the command line? Ideally with some description attached to them (that would be set near the tasks).
I'm thinking of something similar to what rake does with -t (see here for example)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
运行:
这将列出所有定义的任务。
输出列为:
Run:
This will list all the defined tasks.
Output columns are:
我尝试可视化任务依赖性。
不完全是你想要的,但可以帮助你。查看 psake-contrib/debugging.psm1 (它需要 DLL来自 https://github.com/stej/psake-contrib/tree/master/库)。基本上,您以与通常相同的方式调用 psake,但不是调用 psake 任务,而是显示任务树。
它不显示所有任务,仅显示您在命令行上指定的任务。不过可以添加:)
I tried to visualize the task dependencies.
Not exactly what you wanted, but could help you. Look at psake-contrib/debugging.psm1 (it needs DLLs from https://github.com/stej/psake-contrib/tree/master/lib). Basically you call psake the same way as usually but instead of calling psake tasks, the tasks tree is displayed.
It doesn't display all the tasks, only the tasks that you specified on command line. Could be added though :)