anchor.diff:      watcher.Dispose()
   
   Target "Help" <| fun _ ->
  +    // TODO: Include instructions for specifying the output name and files to compile.
       printfn "build.(cmd|sh) [<target>] [options]"
       printfn @"for FAKE help: packages\FAKE\tools\FAKE.exe --help"
       printfn "targets:"
  
positive.code: open Fake.FscHelper
  open Fake.ProcessHelper
  
  let version = environVarOrDefault "version" "1.0.0"
  let exeName = environVarOrDefault "exeName" "main.exe"
  
  Target "AssemblyInfo" <| fun _ ->
      CreateFSharpAssemblyInfo "./AssemblyInfo.fs"
          [Attribute.Title "Reload Demo"
           Attribute.Description "Demonstration of compiling and watching F# tools with FAKE"
           Attribute.Version version
  
negative.code: Target "Compile" <| fun _ ->
      // NOTE: file order matters, so this must be explicit.
      // TODO: allow an environVar to specify the file list.
      files
      |> Fsc (fun p ->
              { p with
                  Output = output
                  References = ["packages/FSharp.Core/lib/net40/FSharp.Core.dll"] })
  
  Target "Run" <| fun _ ->
      Shell.Exec output |> ignore
  
  Target "Watch" <| fun _ ->
      use watcher =
          { BaseDirectory = defaultBaseDir
            Includes = files |> List.filter ((<>) assemblyInfo)
            Excludes = [assemblyInfo] }
          |> WatchChanges (fun changes ->
              tracefn "%A" changes
              Run "Run")
  