Is there an option to list the targets (maybe with a description) in fake?

主宰稳场 提交于 2019-12-11 00:38:54

问题


In Ruby (RAKE) you can document your tasks in the following way

# rakefile
desc "cleans ./temp"
task :clean  do
  p :cleaning
end

desc "compile the source"
task :compile => :clean do
  p :compiling
end

$ rake -T # Display the tasks with descriptions, then exit.
rake clean    # cleans ./temp
rake compile  # compile the source

Is this possible with fake ?


回答1:


The same is implemented in FAKE, as I found out when reading the source

// build.fsx

Description "remove temp/"
Target "Clean" (fun _ ->
    CleanDirs [buildDir; deployDir]
)
// ....so on

Dependency graph is shown with .../fake.exe --listTargets or -lt

Available targets:
  - Clean  - remove temp/
     Depends on: []
  - Build
     Depends on: ["Clean"]
  - Deploy
     Depends on: ["Test"]
  - Test
     Depends on: ["Build"]


来源:https://stackoverflow.com/questions/39929989/is-there-an-option-to-list-the-targets-maybe-with-a-description-in-fake

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