File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -366,10 +366,16 @@ module Application =
366366 ServicesConfig = service:: state.ServicesConfig
367367 }
368368
369+ ///Disables generation of diagnostic files that can be used by Saturn tooling.
370+ [<CustomOperation( " disable_diagnostics" ) >]
371+ member __.DisableDiagnostics ( state ) =
372+ SiteMap.isDebug <- false
373+ state
374+
369375 ///Computation expression used to configure Saturn application
370376 let application = ApplicationBuilder()
371377
372378 ///Runs Saturn application
373379 let run ( app : IWebHostBuilder ) =
374- SiteMap.generate ()
380+ if SiteMap.isDebug then SiteMap.generate ()
375381 app.Build() .Run()
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ namespace Saturn
22open System.IO
33
44module SiteMap =
5- let mutable private isDebug = true //Somehow detect if Saturn is used by application compiled in debug or release
5+ let mutable internal isDebug = true //Somehow detect if Saturn is used by application compiled in debug or release
66
77 type internal PathRegistrationEvent =
88 | Path of path : string * verb : string
You can’t perform that action at this time.
0 commit comments