-->

Is there an option to list the targets (maybe with

2019-07-14 21:15发布

问题:

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"]


标签: f#-fake