diff --git a/Fake.sln b/Fake.sln index 533a2780187..ef7f7f13d0e 100644 --- a/Fake.sln +++ b/Fake.sln @@ -96,19 +96,21 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Fake.BuildServer.TeamCity", EndProject Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Fake.BuildServer.AppVeyor", "src/app/Fake.BuildServer.AppVeyor/Fake.BuildServer.AppVeyor.fsproj", "{486FA49B-D395-42C5-AFB0-FA85B6D9FDBC}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fake.BuildServer.Travis", "src/app/Fake.BuildServer.Travis/Fake.BuildServer.Travis.fsproj", "{31F61589-E899-4C58-AF91-371AC6149032}" +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Fake.BuildServer.Travis", "src/app/Fake.BuildServer.Travis/Fake.BuildServer.Travis.fsproj", "{31F61589-E899-4C58-AF91-371AC6149032}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fake.BuildServer.TeamFoundation", "src/app/Fake.BuildServer.TeamFoundation/Fake.BuildServer.TeamFoundation.fsproj", "{5E1B10FE-3F7A-4D10-A804-3C11EC82C21D}" +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Fake.BuildServer.TeamFoundation", "src/app/Fake.BuildServer.TeamFoundation/Fake.BuildServer.TeamFoundation.fsproj", "{5E1B10FE-3F7A-4D10-A804-3C11EC82C21D}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fake.Core.CommandLineParsing", "src/app/Fake.Core.CommandLineParsing/Fake.Core.CommandLineParsing.fsproj", "{CA6EB1B3-EB3A-4063-8A6C-DE099A53A8B1}" +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Fake.Core.CommandLineParsing", "src/app/Fake.Core.CommandLineParsing/Fake.Core.CommandLineParsing.fsproj", "{CA6EB1B3-EB3A-4063-8A6C-DE099A53A8B1}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{E09B72E4-D890-46A8-8D14-7367C2E23E9D}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fake.Core.CommandLine.UnitTests", "src/test/Fake.Core.CommandLine.UnitTests/Fake.Core.CommandLine.UnitTests.fsproj", "{8561A35A-C2A4-43C7-A938-CB35A7747121}" +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Fake.Core.CommandLine.UnitTests", "src/test/Fake.Core.CommandLine.UnitTests/Fake.Core.CommandLine.UnitTests.fsproj", "{8561A35A-C2A4-43C7-A938-CB35A7747121}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fake.Api.HockeyApp", "src/app/Fake.Api.HockeyApp/Fake.Api.HockeyApp.fsproj", "{B636A082-4DB4-439D-8A37-E5214BDC00A3}" +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Fake.Documentation.DocFx", "src/app/Fake.Documentation.DocFx/Fake.Documentation.DocFx.fsproj", "{77E0066D-A04D-445B-B036-9008A40F8A44}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fake.JavaScript.Yarn", "src/app/Fake.JavaScript.Yarn/Fake.JavaScript.Yarn.fsproj", "{DE7579F2-C20F-4C35-BC04-C10362912243}" +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Fake.Api.HockeyApp", "src/app/Fake.Api.HockeyApp/Fake.Api.HockeyApp.fsproj", "{B636A082-4DB4-439D-8A37-E5214BDC00A3}" +EndProject +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Fake.JavaScript.Yarn", "src/app/Fake.JavaScript.Yarn/Fake.JavaScript.Yarn.fsproj", "{DE7579F2-C20F-4C35-BC04-C10362912243}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -360,6 +362,18 @@ Global {46ED6A9C-C5BF-4495-924E-478736FC280E}.Release|x64.Build.0 = Release|Any CPU {46ED6A9C-C5BF-4495-924E-478736FC280E}.Release|x86.ActiveCfg = Release|Any CPU {46ED6A9C-C5BF-4495-924E-478736FC280E}.Release|x86.Build.0 = Release|Any CPU + {D2B2F400-C74C-442F-A1DA-4DD89A1C61B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D2B2F400-C74C-442F-A1DA-4DD89A1C61B7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D2B2F400-C74C-442F-A1DA-4DD89A1C61B7}.Debug|x64.ActiveCfg = Debug|Any CPU + {D2B2F400-C74C-442F-A1DA-4DD89A1C61B7}.Debug|x64.Build.0 = Debug|Any CPU + {D2B2F400-C74C-442F-A1DA-4DD89A1C61B7}.Debug|x86.ActiveCfg = Debug|Any CPU + {D2B2F400-C74C-442F-A1DA-4DD89A1C61B7}.Debug|x86.Build.0 = Debug|Any CPU + {D2B2F400-C74C-442F-A1DA-4DD89A1C61B7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D2B2F400-C74C-442F-A1DA-4DD89A1C61B7}.Release|Any CPU.Build.0 = Release|Any CPU + {D2B2F400-C74C-442F-A1DA-4DD89A1C61B7}.Release|x64.ActiveCfg = Release|Any CPU + {D2B2F400-C74C-442F-A1DA-4DD89A1C61B7}.Release|x64.Build.0 = Release|Any CPU + {D2B2F400-C74C-442F-A1DA-4DD89A1C61B7}.Release|x86.ActiveCfg = Release|Any CPU + {D2B2F400-C74C-442F-A1DA-4DD89A1C61B7}.Release|x86.Build.0 = Release|Any CPU {44A3F022-D70A-422D-B850-824BB572F2AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {44A3F022-D70A-422D-B850-824BB572F2AF}.Debug|Any CPU.Build.0 = Debug|Any CPU {44A3F022-D70A-422D-B850-824BB572F2AF}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -588,90 +602,90 @@ Global {F15967FF-E905-4CAD-9545-E59E0F47AD8E}.Release|x64.Build.0 = Release|Any CPU {F15967FF-E905-4CAD-9545-E59E0F47AD8E}.Release|x86.ActiveCfg = Release|Any CPU {F15967FF-E905-4CAD-9545-E59E0F47AD8E}.Release|x86.Build.0 = Release|Any CPU - {D2B2F400-C74C-442F-A1DA-4DD89A1C61B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D2B2F400-C74C-442F-A1DA-4DD89A1C61B7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D2B2F400-C74C-442F-A1DA-4DD89A1C61B7}.Debug|x64.ActiveCfg = Debug|Any CPU - {D2B2F400-C74C-442F-A1DA-4DD89A1C61B7}.Debug|x64.Build.0 = Debug|Any CPU - {D2B2F400-C74C-442F-A1DA-4DD89A1C61B7}.Debug|x86.ActiveCfg = Debug|Any CPU - {D2B2F400-C74C-442F-A1DA-4DD89A1C61B7}.Debug|x86.Build.0 = Debug|Any CPU - {D2B2F400-C74C-442F-A1DA-4DD89A1C61B7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D2B2F400-C74C-442F-A1DA-4DD89A1C61B7}.Release|Any CPU.Build.0 = Release|Any CPU - {D2B2F400-C74C-442F-A1DA-4DD89A1C61B7}.Release|x64.ActiveCfg = Release|Any CPU - {D2B2F400-C74C-442F-A1DA-4DD89A1C61B7}.Release|x64.Build.0 = Release|Any CPU - {D2B2F400-C74C-442F-A1DA-4DD89A1C61B7}.Release|x86.ActiveCfg = Release|Any CPU - {D2B2F400-C74C-442F-A1DA-4DD89A1C61B7}.Release|x86.Build.0 = Release|Any CPU {9EA0CFE4-ED50-4CB9-BE93-1AFB9D90C878}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9EA0CFE4-ED50-4CB9-BE93-1AFB9D90C878}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9EA0CFE4-ED50-4CB9-BE93-1AFB9D90C878}.Debug|x64.ActiveCfg = Debug|x64 - {9EA0CFE4-ED50-4CB9-BE93-1AFB9D90C878}.Debug|x64.Build.0 = Debug|x64 - {9EA0CFE4-ED50-4CB9-BE93-1AFB9D90C878}.Debug|x86.ActiveCfg = Debug|x86 - {9EA0CFE4-ED50-4CB9-BE93-1AFB9D90C878}.Debug|x86.Build.0 = Debug|x86 + {9EA0CFE4-ED50-4CB9-BE93-1AFB9D90C878}.Debug|x64.ActiveCfg = Debug|Any CPU + {9EA0CFE4-ED50-4CB9-BE93-1AFB9D90C878}.Debug|x64.Build.0 = Debug|Any CPU + {9EA0CFE4-ED50-4CB9-BE93-1AFB9D90C878}.Debug|x86.ActiveCfg = Debug|Any CPU + {9EA0CFE4-ED50-4CB9-BE93-1AFB9D90C878}.Debug|x86.Build.0 = Debug|Any CPU {9EA0CFE4-ED50-4CB9-BE93-1AFB9D90C878}.Release|Any CPU.ActiveCfg = Release|Any CPU {9EA0CFE4-ED50-4CB9-BE93-1AFB9D90C878}.Release|Any CPU.Build.0 = Release|Any CPU - {9EA0CFE4-ED50-4CB9-BE93-1AFB9D90C878}.Release|x64.ActiveCfg = Release|x64 - {9EA0CFE4-ED50-4CB9-BE93-1AFB9D90C878}.Release|x64.Build.0 = Release|x64 - {9EA0CFE4-ED50-4CB9-BE93-1AFB9D90C878}.Release|x86.ActiveCfg = Release|x86 - {9EA0CFE4-ED50-4CB9-BE93-1AFB9D90C878}.Release|x86.Build.0 = Release|x86 + {9EA0CFE4-ED50-4CB9-BE93-1AFB9D90C878}.Release|x64.ActiveCfg = Release|Any CPU + {9EA0CFE4-ED50-4CB9-BE93-1AFB9D90C878}.Release|x64.Build.0 = Release|Any CPU + {9EA0CFE4-ED50-4CB9-BE93-1AFB9D90C878}.Release|x86.ActiveCfg = Release|Any CPU + {9EA0CFE4-ED50-4CB9-BE93-1AFB9D90C878}.Release|x86.Build.0 = Release|Any CPU {486FA49B-D395-42C5-AFB0-FA85B6D9FDBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {486FA49B-D395-42C5-AFB0-FA85B6D9FDBC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {486FA49B-D395-42C5-AFB0-FA85B6D9FDBC}.Debug|x64.ActiveCfg = Debug|x64 - {486FA49B-D395-42C5-AFB0-FA85B6D9FDBC}.Debug|x64.Build.0 = Debug|x64 - {486FA49B-D395-42C5-AFB0-FA85B6D9FDBC}.Debug|x86.ActiveCfg = Debug|x86 - {486FA49B-D395-42C5-AFB0-FA85B6D9FDBC}.Debug|x86.Build.0 = Debug|x86 + {486FA49B-D395-42C5-AFB0-FA85B6D9FDBC}.Debug|x64.ActiveCfg = Debug|Any CPU + {486FA49B-D395-42C5-AFB0-FA85B6D9FDBC}.Debug|x64.Build.0 = Debug|Any CPU + {486FA49B-D395-42C5-AFB0-FA85B6D9FDBC}.Debug|x86.ActiveCfg = Debug|Any CPU + {486FA49B-D395-42C5-AFB0-FA85B6D9FDBC}.Debug|x86.Build.0 = Debug|Any CPU {486FA49B-D395-42C5-AFB0-FA85B6D9FDBC}.Release|Any CPU.ActiveCfg = Release|Any CPU {486FA49B-D395-42C5-AFB0-FA85B6D9FDBC}.Release|Any CPU.Build.0 = Release|Any CPU - {486FA49B-D395-42C5-AFB0-FA85B6D9FDBC}.Release|x64.ActiveCfg = Release|x64 - {486FA49B-D395-42C5-AFB0-FA85B6D9FDBC}.Release|x64.Build.0 = Release|x64 - {486FA49B-D395-42C5-AFB0-FA85B6D9FDBC}.Release|x86.ActiveCfg = Release|x86 - {486FA49B-D395-42C5-AFB0-FA85B6D9FDBC}.Release|x86.Build.0 = Release|x86 + {486FA49B-D395-42C5-AFB0-FA85B6D9FDBC}.Release|x64.ActiveCfg = Release|Any CPU + {486FA49B-D395-42C5-AFB0-FA85B6D9FDBC}.Release|x64.Build.0 = Release|Any CPU + {486FA49B-D395-42C5-AFB0-FA85B6D9FDBC}.Release|x86.ActiveCfg = Release|Any CPU + {486FA49B-D395-42C5-AFB0-FA85B6D9FDBC}.Release|x86.Build.0 = Release|Any CPU {31F61589-E899-4C58-AF91-371AC6149032}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {31F61589-E899-4C58-AF91-371AC6149032}.Debug|Any CPU.Build.0 = Debug|Any CPU - {31F61589-E899-4C58-AF91-371AC6149032}.Debug|x64.ActiveCfg = Debug|x64 - {31F61589-E899-4C58-AF91-371AC6149032}.Debug|x64.Build.0 = Debug|x64 - {31F61589-E899-4C58-AF91-371AC6149032}.Debug|x86.ActiveCfg = Debug|x86 - {31F61589-E899-4C58-AF91-371AC6149032}.Debug|x86.Build.0 = Debug|x86 + {31F61589-E899-4C58-AF91-371AC6149032}.Debug|x64.ActiveCfg = Debug|Any CPU + {31F61589-E899-4C58-AF91-371AC6149032}.Debug|x64.Build.0 = Debug|Any CPU + {31F61589-E899-4C58-AF91-371AC6149032}.Debug|x86.ActiveCfg = Debug|Any CPU + {31F61589-E899-4C58-AF91-371AC6149032}.Debug|x86.Build.0 = Debug|Any CPU {31F61589-E899-4C58-AF91-371AC6149032}.Release|Any CPU.ActiveCfg = Release|Any CPU {31F61589-E899-4C58-AF91-371AC6149032}.Release|Any CPU.Build.0 = Release|Any CPU - {31F61589-E899-4C58-AF91-371AC6149032}.Release|x64.ActiveCfg = Release|x64 - {31F61589-E899-4C58-AF91-371AC6149032}.Release|x64.Build.0 = Release|x64 - {31F61589-E899-4C58-AF91-371AC6149032}.Release|x86.ActiveCfg = Release|x86 - {31F61589-E899-4C58-AF91-371AC6149032}.Release|x86.Build.0 = Release|x86 + {31F61589-E899-4C58-AF91-371AC6149032}.Release|x64.ActiveCfg = Release|Any CPU + {31F61589-E899-4C58-AF91-371AC6149032}.Release|x64.Build.0 = Release|Any CPU + {31F61589-E899-4C58-AF91-371AC6149032}.Release|x86.ActiveCfg = Release|Any CPU + {31F61589-E899-4C58-AF91-371AC6149032}.Release|x86.Build.0 = Release|Any CPU {5E1B10FE-3F7A-4D10-A804-3C11EC82C21D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5E1B10FE-3F7A-4D10-A804-3C11EC82C21D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5E1B10FE-3F7A-4D10-A804-3C11EC82C21D}.Debug|x64.ActiveCfg = Debug|x64 - {5E1B10FE-3F7A-4D10-A804-3C11EC82C21D}.Debug|x64.Build.0 = Debug|x64 - {5E1B10FE-3F7A-4D10-A804-3C11EC82C21D}.Debug|x86.ActiveCfg = Debug|x86 - {5E1B10FE-3F7A-4D10-A804-3C11EC82C21D}.Debug|x86.Build.0 = Debug|x86 + {5E1B10FE-3F7A-4D10-A804-3C11EC82C21D}.Debug|x64.ActiveCfg = Debug|Any CPU + {5E1B10FE-3F7A-4D10-A804-3C11EC82C21D}.Debug|x64.Build.0 = Debug|Any CPU + {5E1B10FE-3F7A-4D10-A804-3C11EC82C21D}.Debug|x86.ActiveCfg = Debug|Any CPU + {5E1B10FE-3F7A-4D10-A804-3C11EC82C21D}.Debug|x86.Build.0 = Debug|Any CPU {5E1B10FE-3F7A-4D10-A804-3C11EC82C21D}.Release|Any CPU.ActiveCfg = Release|Any CPU {5E1B10FE-3F7A-4D10-A804-3C11EC82C21D}.Release|Any CPU.Build.0 = Release|Any CPU - {5E1B10FE-3F7A-4D10-A804-3C11EC82C21D}.Release|x64.ActiveCfg = Release|x64 - {5E1B10FE-3F7A-4D10-A804-3C11EC82C21D}.Release|x64.Build.0 = Release|x64 - {5E1B10FE-3F7A-4D10-A804-3C11EC82C21D}.Release|x86.ActiveCfg = Release|x86 - {5E1B10FE-3F7A-4D10-A804-3C11EC82C21D}.Release|x86.Build.0 = Release|x86 + {5E1B10FE-3F7A-4D10-A804-3C11EC82C21D}.Release|x64.ActiveCfg = Release|Any CPU + {5E1B10FE-3F7A-4D10-A804-3C11EC82C21D}.Release|x64.Build.0 = Release|Any CPU + {5E1B10FE-3F7A-4D10-A804-3C11EC82C21D}.Release|x86.ActiveCfg = Release|Any CPU + {5E1B10FE-3F7A-4D10-A804-3C11EC82C21D}.Release|x86.Build.0 = Release|Any CPU {CA6EB1B3-EB3A-4063-8A6C-DE099A53A8B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CA6EB1B3-EB3A-4063-8A6C-DE099A53A8B1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CA6EB1B3-EB3A-4063-8A6C-DE099A53A8B1}.Debug|x64.ActiveCfg = Debug|x64 - {CA6EB1B3-EB3A-4063-8A6C-DE099A53A8B1}.Debug|x64.Build.0 = Debug|x64 - {CA6EB1B3-EB3A-4063-8A6C-DE099A53A8B1}.Debug|x86.ActiveCfg = Debug|x86 - {CA6EB1B3-EB3A-4063-8A6C-DE099A53A8B1}.Debug|x86.Build.0 = Debug|x86 + {CA6EB1B3-EB3A-4063-8A6C-DE099A53A8B1}.Debug|x64.ActiveCfg = Debug|Any CPU + {CA6EB1B3-EB3A-4063-8A6C-DE099A53A8B1}.Debug|x64.Build.0 = Debug|Any CPU + {CA6EB1B3-EB3A-4063-8A6C-DE099A53A8B1}.Debug|x86.ActiveCfg = Debug|Any CPU + {CA6EB1B3-EB3A-4063-8A6C-DE099A53A8B1}.Debug|x86.Build.0 = Debug|Any CPU {CA6EB1B3-EB3A-4063-8A6C-DE099A53A8B1}.Release|Any CPU.ActiveCfg = Release|Any CPU {CA6EB1B3-EB3A-4063-8A6C-DE099A53A8B1}.Release|Any CPU.Build.0 = Release|Any CPU - {CA6EB1B3-EB3A-4063-8A6C-DE099A53A8B1}.Release|x64.ActiveCfg = Release|x64 - {CA6EB1B3-EB3A-4063-8A6C-DE099A53A8B1}.Release|x64.Build.0 = Release|x64 - {CA6EB1B3-EB3A-4063-8A6C-DE099A53A8B1}.Release|x86.ActiveCfg = Release|x86 - {CA6EB1B3-EB3A-4063-8A6C-DE099A53A8B1}.Release|x86.Build.0 = Release|x86 + {CA6EB1B3-EB3A-4063-8A6C-DE099A53A8B1}.Release|x64.ActiveCfg = Release|Any CPU + {CA6EB1B3-EB3A-4063-8A6C-DE099A53A8B1}.Release|x64.Build.0 = Release|Any CPU + {CA6EB1B3-EB3A-4063-8A6C-DE099A53A8B1}.Release|x86.ActiveCfg = Release|Any CPU + {CA6EB1B3-EB3A-4063-8A6C-DE099A53A8B1}.Release|x86.Build.0 = Release|Any CPU {8561A35A-C2A4-43C7-A938-CB35A7747121}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8561A35A-C2A4-43C7-A938-CB35A7747121}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8561A35A-C2A4-43C7-A938-CB35A7747121}.Debug|x64.ActiveCfg = Debug|x64 - {8561A35A-C2A4-43C7-A938-CB35A7747121}.Debug|x64.Build.0 = Debug|x64 - {8561A35A-C2A4-43C7-A938-CB35A7747121}.Debug|x86.ActiveCfg = Debug|x86 - {8561A35A-C2A4-43C7-A938-CB35A7747121}.Debug|x86.Build.0 = Debug|x86 + {8561A35A-C2A4-43C7-A938-CB35A7747121}.Debug|x64.ActiveCfg = Debug|Any CPU + {8561A35A-C2A4-43C7-A938-CB35A7747121}.Debug|x64.Build.0 = Debug|Any CPU + {8561A35A-C2A4-43C7-A938-CB35A7747121}.Debug|x86.ActiveCfg = Debug|Any CPU + {8561A35A-C2A4-43C7-A938-CB35A7747121}.Debug|x86.Build.0 = Debug|Any CPU {8561A35A-C2A4-43C7-A938-CB35A7747121}.Release|Any CPU.ActiveCfg = Release|Any CPU {8561A35A-C2A4-43C7-A938-CB35A7747121}.Release|Any CPU.Build.0 = Release|Any CPU - {8561A35A-C2A4-43C7-A938-CB35A7747121}.Release|x64.ActiveCfg = Release|x64 - {8561A35A-C2A4-43C7-A938-CB35A7747121}.Release|x64.Build.0 = Release|x64 - {8561A35A-C2A4-43C7-A938-CB35A7747121}.Release|x86.ActiveCfg = Release|x86 - {8561A35A-C2A4-43C7-A938-CB35A7747121}.Release|x86.Build.0 = Release|x86 + {8561A35A-C2A4-43C7-A938-CB35A7747121}.Release|x64.ActiveCfg = Release|Any CPU + {8561A35A-C2A4-43C7-A938-CB35A7747121}.Release|x64.Build.0 = Release|Any CPU + {8561A35A-C2A4-43C7-A938-CB35A7747121}.Release|x86.ActiveCfg = Release|Any CPU + {8561A35A-C2A4-43C7-A938-CB35A7747121}.Release|x86.Build.0 = Release|Any CPU + {77E0066D-A04D-445B-B036-9008A40F8A44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {77E0066D-A04D-445B-B036-9008A40F8A44}.Debug|Any CPU.Build.0 = Debug|Any CPU + {77E0066D-A04D-445B-B036-9008A40F8A44}.Debug|x64.ActiveCfg = Debug|Any CPU + {77E0066D-A04D-445B-B036-9008A40F8A44}.Debug|x64.Build.0 = Debug|Any CPU + {77E0066D-A04D-445B-B036-9008A40F8A44}.Debug|x86.ActiveCfg = Debug|Any CPU + {77E0066D-A04D-445B-B036-9008A40F8A44}.Debug|x86.Build.0 = Debug|Any CPU + {77E0066D-A04D-445B-B036-9008A40F8A44}.Release|Any CPU.ActiveCfg = Release|Any CPU + {77E0066D-A04D-445B-B036-9008A40F8A44}.Release|Any CPU.Build.0 = Release|Any CPU + {77E0066D-A04D-445B-B036-9008A40F8A44}.Release|x64.ActiveCfg = Release|Any CPU + {77E0066D-A04D-445B-B036-9008A40F8A44}.Release|x64.Build.0 = Release|Any CPU + {77E0066D-A04D-445B-B036-9008A40F8A44}.Release|x86.ActiveCfg = Release|Any CPU + {77E0066D-A04D-445B-B036-9008A40F8A44}.Release|x86.Build.0 = Release|Any CPU {819E2756-7BEE-4FCD-BA08-7BF323405CBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {819E2756-7BEE-4FCD-BA08-7BF323405CBE}.Debug|Any CPU.Build.0 = Debug|Any CPU {819E2756-7BEE-4FCD-BA08-7BF323405CBE}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -686,28 +700,28 @@ Global {819E2756-7BEE-4FCD-BA08-7BF323405CBE}.Release|x86.Build.0 = Release|Any CPU {B636A082-4DB4-439D-8A37-E5214BDC00A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B636A082-4DB4-439D-8A37-E5214BDC00A3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B636A082-4DB4-439D-8A37-E5214BDC00A3}.Debug|x64.ActiveCfg = Debug|x64 - {B636A082-4DB4-439D-8A37-E5214BDC00A3}.Debug|x64.Build.0 = Debug|x64 - {B636A082-4DB4-439D-8A37-E5214BDC00A3}.Debug|x86.ActiveCfg = Debug|x86 - {B636A082-4DB4-439D-8A37-E5214BDC00A3}.Debug|x86.Build.0 = Debug|x86 + {B636A082-4DB4-439D-8A37-E5214BDC00A3}.Debug|x64.ActiveCfg = Debug|Any CPU + {B636A082-4DB4-439D-8A37-E5214BDC00A3}.Debug|x64.Build.0 = Debug|Any CPU + {B636A082-4DB4-439D-8A37-E5214BDC00A3}.Debug|x86.ActiveCfg = Debug|Any CPU + {B636A082-4DB4-439D-8A37-E5214BDC00A3}.Debug|x86.Build.0 = Debug|Any CPU {B636A082-4DB4-439D-8A37-E5214BDC00A3}.Release|Any CPU.ActiveCfg = Release|Any CPU {B636A082-4DB4-439D-8A37-E5214BDC00A3}.Release|Any CPU.Build.0 = Release|Any CPU - {B636A082-4DB4-439D-8A37-E5214BDC00A3}.Release|x64.ActiveCfg = Release|x64 - {B636A082-4DB4-439D-8A37-E5214BDC00A3}.Release|x64.Build.0 = Release|x64 - {B636A082-4DB4-439D-8A37-E5214BDC00A3}.Release|x86.ActiveCfg = Release|x86 - {B636A082-4DB4-439D-8A37-E5214BDC00A3}.Release|x86.Build.0 = Release|x86 + {B636A082-4DB4-439D-8A37-E5214BDC00A3}.Release|x64.ActiveCfg = Release|Any CPU + {B636A082-4DB4-439D-8A37-E5214BDC00A3}.Release|x64.Build.0 = Release|Any CPU + {B636A082-4DB4-439D-8A37-E5214BDC00A3}.Release|x86.ActiveCfg = Release|Any CPU + {B636A082-4DB4-439D-8A37-E5214BDC00A3}.Release|x86.Build.0 = Release|Any CPU {DE7579F2-C20F-4C35-BC04-C10362912243}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DE7579F2-C20F-4C35-BC04-C10362912243}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DE7579F2-C20F-4C35-BC04-C10362912243}.Debug|x64.ActiveCfg = Debug|x64 - {DE7579F2-C20F-4C35-BC04-C10362912243}.Debug|x64.Build.0 = Debug|x64 - {DE7579F2-C20F-4C35-BC04-C10362912243}.Debug|x86.ActiveCfg = Debug|x86 - {DE7579F2-C20F-4C35-BC04-C10362912243}.Debug|x86.Build.0 = Debug|x86 + {DE7579F2-C20F-4C35-BC04-C10362912243}.Debug|x64.ActiveCfg = Debug|Any CPU + {DE7579F2-C20F-4C35-BC04-C10362912243}.Debug|x64.Build.0 = Debug|Any CPU + {DE7579F2-C20F-4C35-BC04-C10362912243}.Debug|x86.ActiveCfg = Debug|Any CPU + {DE7579F2-C20F-4C35-BC04-C10362912243}.Debug|x86.Build.0 = Debug|Any CPU {DE7579F2-C20F-4C35-BC04-C10362912243}.Release|Any CPU.ActiveCfg = Release|Any CPU {DE7579F2-C20F-4C35-BC04-C10362912243}.Release|Any CPU.Build.0 = Release|Any CPU - {DE7579F2-C20F-4C35-BC04-C10362912243}.Release|x64.ActiveCfg = Release|x64 - {DE7579F2-C20F-4C35-BC04-C10362912243}.Release|x64.Build.0 = Release|x64 - {DE7579F2-C20F-4C35-BC04-C10362912243}.Release|x86.ActiveCfg = Release|x86 - {DE7579F2-C20F-4C35-BC04-C10362912243}.Release|x86.Build.0 = Release|x86 + {DE7579F2-C20F-4C35-BC04-C10362912243}.Release|x64.ActiveCfg = Release|Any CPU + {DE7579F2-C20F-4C35-BC04-C10362912243}.Release|x64.Build.0 = Release|Any CPU + {DE7579F2-C20F-4C35-BC04-C10362912243}.Release|x86.ActiveCfg = Release|Any CPU + {DE7579F2-C20F-4C35-BC04-C10362912243}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -733,6 +747,7 @@ Global {21E2FE31-4E7C-489E-8215-9303108A2F30} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A} {4B1416CD-C7CB-4670-8EFE-871ED316D51D} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A} {46ED6A9C-C5BF-4495-924E-478736FC280E} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A} + {D2B2F400-C74C-442F-A1DA-4DD89A1C61B7} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A} {44A3F022-D70A-422D-B850-824BB572F2AF} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A} {7D629246-957C-4989-A1E6-29C673086925} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A} {A95B731B-5887-4EF5-A64D-B643FA8EBD92} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A} @@ -752,7 +767,6 @@ Global {8D72BED1-BC02-4B23-A631-4849BD0FD3E1} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A} {A1CAA84D-3C99-4218-AFB6-55EE2288800E} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A} {F15967FF-E905-4CAD-9545-E59E0F47AD8E} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A} - {D2B2F400-C74C-442F-A1DA-4DD89A1C61B7} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A} {901F162F-8925-4390-89C5-9EE2C343F744} = {539D7B9A-18A1-4D79-86AB-C8B48090CA84} {9EA0CFE4-ED50-4CB9-BE93-1AFB9D90C878} = {901F162F-8925-4390-89C5-9EE2C343F744} {486FA49B-D395-42C5-AFB0-FA85B6D9FDBC} = {901F162F-8925-4390-89C5-9EE2C343F744} @@ -761,6 +775,7 @@ Global {CA6EB1B3-EB3A-4063-8A6C-DE099A53A8B1} = {901F162F-8925-4390-89C5-9EE2C343F744} {E09B72E4-D890-46A8-8D14-7367C2E23E9D} = {539D7B9A-18A1-4D79-86AB-C8B48090CA84} {8561A35A-C2A4-43C7-A938-CB35A7747121} = {E09B72E4-D890-46A8-8D14-7367C2E23E9D} + {77E0066D-A04D-445B-B036-9008A40F8A44} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A} {819E2756-7BEE-4FCD-BA08-7BF323405CBE} = {7BFFAE76-DEE9-417A-A79B-6A6644C4553A} {B636A082-4DB4-439D-8A37-E5214BDC00A3} = {901F162F-8925-4390-89C5-9EE2C343F744} {DE7579F2-C20F-4C35-BC04-C10362912243} = {901F162F-8925-4390-89C5-9EE2C343F744} diff --git a/build.fsx b/build.fsx index ca2fff13dd3..b7e66e6fa42 100644 --- a/build.fsx +++ b/build.fsx @@ -288,7 +288,8 @@ let dotnetAssemblyInfos = "Fake.Tracing.NAntXml", "NAntXml" "Fake.Windows.Chocolatey", "Running and packaging with Chocolatey" "Fake.Testing.SonarQube", "Analyzing your project with SonarQube" - "Fake.DotNet.Testing.OpenCover", "Code coverage with OpenCover" ] + "Fake.DotNet.Testing.OpenCover", "Code coverage with OpenCover" + "Fake.Documentation.DocFx", "Documentation with DocFx" ] let assemblyInfos = [ legacyDir "FAKE/AssemblyInfo.fs", diff --git a/src/app/Fake.Documentation.DocFx/AssemblyInfo.fs b/src/app/Fake.Documentation.DocFx/AssemblyInfo.fs new file mode 100644 index 00000000000..854fd2e41b0 --- /dev/null +++ b/src/app/Fake.Documentation.DocFx/AssemblyInfo.fs @@ -0,0 +1,17 @@ +// Auto-Generated by FAKE; do not edit +namespace System +open System.Reflection + +[] +[] +[] +[] +[] +do () + +module internal AssemblyVersionInformation = + let [] AssemblyTitle = "FAKE - F# Make Documentation with DocFx" + let [] AssemblyProduct = "FAKE - F# Make" + let [] AssemblyVersion = "5.0.0" + let [] AssemblyInformationalVersion = "5.0.0-rc005" + let [] AssemblyFileVersion = "5.0.0" diff --git a/src/app/Fake.Documentation.DocFx/DocFx.fs b/src/app/Fake.Documentation.DocFx/DocFx.fs new file mode 100644 index 00000000000..02b17005959 --- /dev/null +++ b/src/app/Fake.Documentation.DocFx/DocFx.fs @@ -0,0 +1,757 @@ +/// Contains helper functions to use DocFx https://dotnet.github.io/docfx/. + +[] +module Fake.Documentation.DocFx + +open System +open System.IO +open Fake.Core +open Fake.IO +open Fake.IO.Globbing +open Fake.IO.FileSystemOperators + + +let private docFxPath = + let docFxExe = "docfx.exe" + let toolPath = Tools.findToolInSubPath docFxExe (Directory.GetCurrentDirectory() @@ "tools" @@ "docfx.console" @@ "tools") + if File.exists toolPath then toolPath + else + match Process.tryFindFileOnPath docFxExe with + | Some docFx when File.Exists docFx -> docFx + | _ -> toolPath + + + +let private boolParam = Process.boolParam +let private stringParam (paramName,paramValue) = Process.stringParam (paramName, Process.quoteIfNeeded paramValue) +let private optionParam = Process.optionParam +let private seperated xs = xs |> String.separated "," +let private stringListParam (paramName, paramValue)= + match paramValue with + | [] -> None + | xs -> stringParam (paramName, xs |> seperated) +let private paramsToString = Process.parametersToString "--" "=" + +type CommonParams = + { + /// The tool path - FAKE tries to find docfx.exe automatically in any sub folder. + DocFxPath : string + + /// Specify a timeout for DocFx. Default: 5 min. + Timeout : TimeSpan + + /// Specify the process working directory + WorkingDirectory : string + } + /// Common default parameters + static member Create() = + { + DocFxPath = docFxPath + WorkingDirectory = "" + Timeout = TimeSpan.FromMinutes 5. + } + +let exec setParams command args= + let commandArgs = sprintf "%s %s" command args + use __ = Trace.traceTask "DocFx" commandArgs + let p = CommonParams.Create() |> setParams + if 0 <> Process.execSimple ((fun info -> + { info with + FileName = p.DocFxPath + WorkingDirectory = p.WorkingDirectory + Arguments = commandArgs })) p.Timeout + then failwithf "DocFx command %s failed." commandArgs + +/// Init-Command parameters +type InitParams = + { + /// Specify common docFx options + Common : CommonParams + + /// Specify if the current file will be overwritten if it exists. + Overwrite : bool + + /// Specify the output folder of the config file. Defaults to docfx_project. + OutputFolder : string + + /// Generate config file docfx.json only, no project folder will be generated. + OnlyConfigFile : bool + + /// Specify the source project files' glob pattern to generate metadata. + ApiSourceGlobPattern : string + + /// Specify the source working folder for source project files to start glob search. + ApiSourceFolder : string + } + /// Changes the "Common" parameters according to the given function + member inline x.WithCommon f = + {x with Common = f x.Common} + + /// Init default parameters + static member Create() = + { + Common = CommonParams.Create() + Overwrite = false + OutputFolder = "" + OnlyConfigFile = false + ApiSourceGlobPattern = "" + ApiSourceFolder = "" + } + + + +let private serializeInitParams p = + [ boolParam ("quiet",true) + boolParam ("overwrite", p.Overwrite) + stringParam ("output", p.OutputFolder) + boolParam ("file", p.OnlyConfigFile) + stringParam ("apiGlobPattern", p.ApiSourceGlobPattern) + stringParam ("apiSourceFolder", p.ApiSourceFolder) ] + |> paramsToString + + +/// Initialize a DocFx documentation. +/// ## Parameters +/// - `setParams` - Function used to manipulate the default Init parameters. See `InitParams.Create()` +/// ## Sample +/// +/// DocFx.init (fun p -> +/// { p with +/// Overwrite = true +/// Timeout = TimeSpan.FromMinutes 10. +/// }) + +let init setParams = + let p = InitParams.Create() |> setParams + p + |> serializeInitParams + |> exec (fun _ -> p.Common) "init" + +type LogLevel = | Diagnostic + | Verbose + | Info + | Warning + | Error +/// Parameters for logging +type LogParams = + { + /// Specify the file name to save processing log. + LogFilePath : string + + /// Specify to which log level will be logged. By default log level >= Info will be logged. The acceptable value could be Verbose, Info, Warning, Error. + LogLevel : LogLevel option + + /// Specify the GIT repository root folder. + RepoRoot : string + + /// Specify the correlation id used for logging. + CorrelationId : string + } + /// Log default parameters + static member Create() = + { + LogFilePath = "" + LogLevel = None + RepoRoot = "" + CorrelationId = "" + } + +let private parseLogLevel = + Option.map (fun o -> + match o with + | Diagnostic -> "Diagnostic" + | Verbose -> "Verbose" + | Info -> "Info" + | Warning -> "Warning" + | Error -> "Error") + +let private parseLogParams p = + [ stringParam ("log", p.LogFilePath) + optionParam ("logLevel", (parseLogLevel p.LogLevel)) + stringParam ("repositoryRoot", p.RepoRoot) + stringParam ("correlationId", p.CorrelationId) ] + +/// Build-Command parameters +type BuildParams = + { + /// Specify common docFx options + Common : CommonParams + + /// Specify the output base directory. + OutputFolder : string + + /// Specify the config file path. + ConfigFile : string + + /// Specify content files for generating documentation. + Content : string list + + /// Specify resources used by content files. + Resource : string list + + /// Specify overwrite files used by content files. + Overwrite : string list + + /// Specify the urls of xrefmap used by content files. + XRefMaps : string list + + /// Specify the template name to apply to. If not specified, output YAML file will not be transformed. + Templates : string list + + /// Specify which theme to use. By default 'default' theme is offered. + Themes : string list + + /// Host the generated documentation to a website. + Serve : bool + + /// Specify the hostname of the hosted website (e.g., 'localhost' or '*'). + Host : string + + /// Specify the port of the hosted website. + Port : int option + + /// Force re-build all the documentation. + ForceRebuild : bool + + /// Run in debug mode. With debug mode, raw model and view model will be exported automatically when it encounters error when applying templates. If not specified, it is false. + EnableDebugMode : bool + + /// The output folder for files generated for debugging purpose when in debug mode. If not specified, it is ${TempPath}/docfx. + OutputFolderForDebugFiles : string + + /// Force to re-process the documentation in post processors. It will be cascaded from force option. + ForcePostProcess : bool + + /// Specify global metadata key-value pair in json format. It overrides the globalMetadata settings from the config file. + GlobalMetadata : string + + /// Specify a list of JSON file path containing globalMetadata settings, as similar to {\"key\":\"value\"}. It overrides the globalMetadata settings from the config file. + GlobalMetadataFilePaths : string list + + /// Specify a list of JSON file path containing fileMetadata settings, as similar to {\"key\":\"value\"}. It overrides the fileMetadata settings from the config file. + FileMetadataFilePaths : string list + + /// If set to true, data model to run template script will be extracted in .raw.model.json extension. + ExportRawModel : bool + + /// Specify the output folder for the raw model. If not set, the raw model will be generated to the same folder as the output documentation. + RawModelOutputFolder : string + + /// Specify the output folder for the view model. If not set, the view model will be generated to the same folder as the output documentation. + ViewModelOutputFolder : string + + /// If set to true, data model to apply template will be extracted in .view.model.json extension. + ExportViewModel : bool + + /// If set to true, template will not be actually applied to the documents. This option is always used with --exportRawModel or --exportViewModel is set so that only raw model files or view model files are generated. + DryRun : bool + + /// Set the max parallelism, 0 is auto. + MaxParallelism : int option + + /// Set the name of markdown engine, default is 'dfm'. + MarkdownEngineName : string + + /// Set the parameters for markdown engine, value should be a JSON string. + MarkdownEngineProperties : string + + /// Disable default lang keyword. + NoLangKeyword : bool option + + /// Set folder for intermediate build results. + IntermediateFolder : string + + /// Set changes file. + ChangesFile : string + + /// Set the order of post processors in plugins. + PostProcessors : string list + + /// Set the LRU cached model count (approximately the same as the count of input files). By default, it is 8192 for 64bit and 3072 for 32bit process. With LRU cache enabled, memory usage decreases and time consumed increases. If set to 0, Lru cache is disabled. + LruSize : int option + + /// If set to true, docfx does not dereference (aka. copy) file to the output folder, instead, it saves a link_to_path property inside mainfiest.json to indicate the physical location of that file. + KeepFileLink : bool + + /// If set to true, docfx create a new intermediate folder for cache files, historical cache data will be cleaned up. + CleanupCacheHistory : bool + + /// Set the name of input file abstract layer builder. + FALName : string + + /// Disable fetching Git related information for articles. By default it is enabled and may have side effect on performance when the repo is large. + DisableGitFeatures : bool + + /// Please provide the license key for validating schema using NewtonsoftJson.Schema here. + SchemaLicense : string + + /// Specify Logging parameter + LogParams : LogParams + } + + /// Build default parameters + static member Create() = + { + Common = CommonParams.Create() + OutputFolder = "" + ConfigFile = "" + Content = [] + Resource = [] + Overwrite = [] + XRefMaps = [] + Templates = [] + Themes = [] + Serve = false + Host = "" + Port = None + ForceRebuild = false + EnableDebugMode = false + OutputFolderForDebugFiles = "" + ForcePostProcess = false + GlobalMetadata = "" + GlobalMetadataFilePaths = [] + FileMetadataFilePaths = [] + ExportRawModel = false + RawModelOutputFolder = "" + ViewModelOutputFolder = "" + ExportViewModel = false + DryRun = false + MaxParallelism = None + MarkdownEngineName = "" + MarkdownEngineProperties = "" + NoLangKeyword = None + IntermediateFolder = "" + ChangesFile = "" + PostProcessors = [] + LruSize = None + KeepFileLink = false + CleanupCacheHistory = false + FALName = "" + DisableGitFeatures = false + SchemaLicense = "" + LogParams = LogParams.Create() + } + /// Changes the "LogParams" according to the given function + member inline x.WithLogParams f = + { x with LogParams = f x.LogParams } + + /// Changes the "Common" parameters according to the given function + member inline x.WithCommon f = + {x with Common = f x.Common} + + +let private parseBuildParams p = + let buildParams = [ + stringParam ("output", p.OutputFolder) + stringListParam ("content", p.Content) + stringListParam ("resource", p.Resource) + stringListParam ("overwrite", p.Overwrite) + stringListParam ("xref", p.XRefMaps) + stringListParam ("template", p.Templates) + stringListParam ("theme", p.Themes) + boolParam ("serve", p.Serve) + stringParam ("hostname", p.Host) + optionParam ("port", p.Port) + boolParam ("force", p.ForceRebuild) + boolParam ("debug", p.EnableDebugMode) + stringParam ("debugOutput", p.OutputFolderForDebugFiles) + boolParam ("forcePostProcess", p.ForcePostProcess) + stringParam ("globalMetadata", p.GlobalMetadata) + stringListParam ("globalMetadataFiles", p.GlobalMetadataFilePaths) + stringListParam ("fileMetadataFiles", p.FileMetadataFilePaths) + boolParam ("exportRawModel", p.ExportRawModel) + stringParam ("rawModelOutputFolder", p.RawModelOutputFolder) + stringParam ("viewModelOutputFolder", p.ViewModelOutputFolder) + boolParam ("exportViewModel", p.ExportViewModel) + boolParam ("dryRun", p.DryRun) + optionParam ("maxParallelism", p.MaxParallelism) + stringParam ("markdownEngineName", p.MarkdownEngineName) + stringParam ("markdownEngineProperties", p.MarkdownEngineProperties) + optionParam ("noLangKeyword", p.NoLangKeyword) + stringParam ("intermediateFolder", p.IntermediateFolder) + stringParam ("changeFile", p.ChangesFile) + stringListParam ("postProcessors", p.PostProcessors) + optionParam ("lruSize", p.LruSize) + boolParam ("keepFileLink", p.KeepFileLink) + boolParam ("cleanupCacheHistory", p.CleanupCacheHistory) + stringParam ("falName", p.FALName) + boolParam ("disableGitFeatures", p.DisableGitFeatures) + stringParam ("schemaLicense", p.SchemaLicense) + ] + List.append buildParams (parseLogParams p.LogParams) + +let private serializeBuildParams p = + p |> parseBuildParams |> paramsToString |> sprintf "%s %s" p.ConfigFile + + +/// Builds a DocFx documentation. +/// ## Parameters +/// - `setParams` - Function used to manipulate the default build parameters. See `BuildParams.Create()` +/// ## Sample +/// +/// DocFx.build (fun p -> +/// { p with +/// OutputFolder = "build" @@ "docs" +/// ConfigFile = "docs" @@ "docfx.json" +/// }) + +let build setParams = + let p = BuildParams.Create() |> setParams + p + |> serializeBuildParams + |> exec (fun _ -> p.Common) "build" + +/// Pdf-Command parameters +type PdfParams = + { + /// Specify build parameters. + BuildParams : BuildParams + /// Specify the name of the generated pdf. + Name : string + + /// Specify the path for the css to generate pdf, default value is styles/default.css. + CssFilePath : string + + /// Specify whether or not to generate appendices for not-in-TOC articles. + GeneratesAppendices : bool option + + /// generatesExternalLink", HelpText = "Specify whether or not to generate external links for PDF. + GeneratesExternalLink : bool option + + /// Specify whether or not to keep the intermediate html files that used to generate the PDF file. It it usually used in debug purpose. By default the value is false. + KeepRawFiles : bool option + + /// Specify how to handle pdf pages that fail to load: abort, ignore or skip(default abort), it is the same input as wkhtmltopdf --load-error-handling options. + LoadErrorHandling : string + + /// Specify the output folder for the raw files, if not specified, raw files will by default be saved to _raw subfolder under output folder if keepRawFiles is set to true. + RawOutputFolder : string + + /// Specify the hostname to link not-in-TOC articles. + Host : string + + /// Specify the locale of the pdf file. + Locale : string + + /// Specify the toc files to be excluded. + ExcludedTocs : string list + + /// Specify the base path to generate external link, {host}/{locale}/{basePath}. + BasePath : string + + } + /// Pdf default parameters + static member Create() = + { + BuildParams = BuildParams.Create() + Name = "" + CssFilePath = "" + GeneratesAppendices = None + GeneratesExternalLink = None + KeepRawFiles = None + LoadErrorHandling = "" + RawOutputFolder = "" + Host = "" + Locale = "" + ExcludedTocs = [] + BasePath = "" + } + + /// Changes the "BuildParams" according to the given function + member inline x.WithBuildParams f = + { x with BuildParams = f x.BuildParams } + /// Changes the "LogParams" according to the given function + member inline x.WithLogParams f = + x.WithBuildParams (fun b -> b.WithLogParams f) + /// Changes the "Common" parameters according to the given function + member inline x.WithCommon f = + x.WithBuildParams (fun b -> b.WithCommon f) +let private parsePdfParams p = + let pdfParams = [ + stringParam ("name", p.Name) + stringParam ("css", p.CssFilePath) + optionParam ("generatesAppendices", p.GeneratesAppendices) + optionParam ("generatesExternalLink", p.GeneratesExternalLink) + optionParam ("keepRawFiles", p.KeepRawFiles) + stringParam ("errorHandling", p.LoadErrorHandling) + stringParam ("rawOutputFolder", p.RawOutputFolder) + stringParam ("host", p.Host) + stringParam ("locale", p.Locale) + stringListParam ("excludedTocs", p.ExcludedTocs) + stringParam ("basePath", p.BasePath) + ] + List.append pdfParams (parseBuildParams p.BuildParams) + +let private serializePdfParams p = + p |> parsePdfParams |> paramsToString |> sprintf "%s %s" p.BuildParams.ConfigFile + +/// Builds a Pdf-File from a DocFx documentation. +/// ## Parameters +/// - `setParams` - Function used to manipulate the default pdf parameters. See `PdfParams.Create()` +/// ## Sample +/// +/// DocFx.pdf (fun p -> +/// { p with +/// Name = "Docs.pdf" } +/// .WithBuildParams (fun b -> +/// { b with +/// OutputFolder = "build" @@ "docs" +/// ConfigFile = "docs" @@ "docfx.json"}) +/// ) +let pdf setParams = + let p = PdfParams.Create() |> setParams + p + |> serializePdfParams + |> exec (fun _ -> p.BuildParams.Common) "pdf" + + + +/// ExportTemplate-Command parameters +type ExportTemplateParams = + { + + /// Specify common docFx options + Common : CommonParams + + /// Specify templates to export. + Templates : string list + + /// If specified, all the available templates will be exported. + All : bool + + /// Specify the output folder path for the exported templates. + OutputFolder : string + } + /// ExportTemplate default parameters + static member Create()= + { + Common = CommonParams.Create() + Templates = [] + All = false + OutputFolder = "" + } + /// Changes the "Common" parameters according to the given function + member inline x.WithCommon f = + {x with Common = f x.Common} + + + +let private serializeExportTemplateParams p = + [ + boolParam ("all", p.All) + stringParam ("output", p.OutputFolder) + ] + |> paramsToString + |> sprintf "export %s %s" (p.Templates |> seperated) + +/// Exports template files. +/// ## Parameters +/// - `setParams` - Function used to manipulate the default exportTemplate parameters. See `ExportTemplateParams.Create()` +/// ## Sample +/// +/// DocFx.exportTemplate (fun p -> +/// { p with +/// All = true +/// OutputFolder = "templates" +/// }) +let exportTemplate setParams = + let p = ExportTemplateParams.Create() |> setParams + p + |> serializeExportTemplateParams + |> exec (fun _ -> p.Common) "template" + +/// Download-Command parameters +type DownloadParams = + { + /// Specify common docFx options + Common : CommonParams + /// Specify the output xref archive. + ArchiveFile : string + + /// Specify the url of xrefmap. + Uri : string + } + /// Download default parameters + static member Create()= + { + Common = CommonParams.Create() + ArchiveFile = "" + Uri = "" + } + /// Changes the "Common" parameters according to the given function + member inline x.WithCommon f = + {x with Common = f x.Common} + +let private serializeDownloadParams p = + [ + stringParam ("xref", p.Uri) + ] + |> paramsToString + |> sprintf "%s %s" p.ArchiveFile + +/// Download xref archive. +/// ## Parameters +/// - `setParams` - Function used to manipulate the default download parameters. See `DownloadParams.Create()` +/// ## Sample +/// +/// DocFx.download (fun p -> +/// { p with +/// ArchiveFile = "archive" +/// Uri = "uri" +/// }) +let download setParams = + let p = DownloadParams.Create() |> setParams + p + |> serializeDownloadParams + |> exec (fun _ -> p.Common) "download" + +/// Serve-Command parameters +type ServeParams = + { + /// Specify common docFx options + Common : CommonParams + + /// folder path + Folder : string + + /// Specify the hostname of the hosted website [localhost]. + Host : string + + /// Specify the port of the hosted website [8080] + Port : int option + + } + /// Serve default parameters + static member Create()= + { + Common = CommonParams.Create() + Folder = "" + Host = "" + Port = None + } + /// Changes the "Common" parameters according to the given function + member inline x.WithCommon f = + {x with Common = f x.Common} + +let private serializeServeParams p = + [ + stringParam ("hostname", p.Host) + optionParam ("port", p.Port) + ] + |> paramsToString + |> sprintf "%s %s" p.Folder + +/// Serves a DocFx documentation. +/// ## Parameters +/// - `setParams` - Function used to manipulate the default serve parameters. See `ServeParams.Create()` +/// ## Sample +/// +/// DocFx.serve (fun p -> +/// { p with +/// Host = "localhost" +/// Port = Some 80 +/// Folder = "docs" +/// }) + +let serve setParams = + let p = ServeParams.Create() |> setParams + p + |> serializeServeParams + |> exec (fun _ -> p.Common) "serve" + +/// Metadata-Command parameters +type MetadataParams = + { + /// Specify common docFx options + Common : CommonParams + + /// Force re-generate all the metadata. + ForceRebuild : bool + + /// Skip to markup the triple slash comments. + ShouldSkipMarkup : bool + + /// Specify the output base directory. + OutputFolder : string + + /// Preserve the existing xml comment tags inside 'summary' triple slash comments. + PreserveRawInlineComments : bool + + /// Specify project files. + Projects : string list + + /// Specify the config file path. + ConfigFile : string + + /// Specify the filter config file. + FilterConfigFile : string + + /// Specify the name to use for the global namespace. + GlobalNamespaceId : string + + /// --property =;= An optional set of MSBuild properties used when interpreting project files. These are the same properties that are passed to msbuild via the /property:=;= command line argument. + MSBuildProperties : string + + /// Disable fetching Git related information for articles. By default it is enabled and may have side effect on performance when the repo is large. + DisableGitFeatures : bool + + /// Specify Logging parameter + LogParams : LogParams + + } + /// Metadata default parameters + static member Create()= + { + Common = CommonParams.Create() + ForceRebuild = false + ShouldSkipMarkup = false + OutputFolder = "" + PreserveRawInlineComments = false + Projects = [] + ConfigFile = "" + FilterConfigFile = "" + GlobalNamespaceId = "" + MSBuildProperties = "" + DisableGitFeatures = false + LogParams = LogParams.Create() + } + /// Changes the "LogParams" according to the given function + member inline x.WithLogParams f = + { x with LogParams = f x.LogParams } + + /// Changes the "Common" parameters according to the given function + member inline x.WithCommon f = + {x with Common = f x.Common} + + +let private serializeMetadataParams p = + let metadata = [ + boolParam ("force", p.ForceRebuild) + boolParam ("shouldSkipMarkup", p.ShouldSkipMarkup) + stringParam ("output" , p.OutputFolder) + boolParam ("raw", p.PreserveRawInlineComments) + stringParam ("filter", p.FilterConfigFile) + stringParam ("globalNamespaceId", p.GlobalNamespaceId) + stringParam ("property", p.MSBuildProperties) + boolParam ("disableGitFeatures", p.DisableGitFeatures) + ] + List.append metadata (parseLogParams p.LogParams) + |> paramsToString + |> sprintf "%s %s %s" p.ConfigFile (seperated p.Projects) + +/// Serves a DocFx documentation. +/// ## Parameters +/// - `setParams` - Function used to manipulate the default serve parameters. See `MetadataParams.Create()` +/// ## Sample +/// +/// DocFx.metadata (fun p -> +/// { p with +/// ConfigFile = "docs" @@ "docfx.json" +/// DisableGitFeatures = true +/// }) + +let metadata setParams = + let p = MetadataParams.Create() |> setParams + p + |> serializeMetadataParams + |> exec (fun _ -> p.Common) "metadata" diff --git a/src/app/Fake.Documentation.DocFx/Fake.Documentation.DocFx.fsproj b/src/app/Fake.Documentation.DocFx/Fake.Documentation.DocFx.fsproj new file mode 100644 index 00000000000..a4f06815d6a --- /dev/null +++ b/src/app/Fake.Documentation.DocFx/Fake.Documentation.DocFx.fsproj @@ -0,0 +1,22 @@ + + + net46;netstandard1.6;netstandard2.0 + Fake.Documentation.DocFx + Library + + + $(DefineConstants);RELEASE + + + + + + + + + + + + + diff --git a/src/app/Fake.Documentation.DocFx/paket.references b/src/app/Fake.Documentation.DocFx/paket.references new file mode 100644 index 00000000000..edc34b53625 --- /dev/null +++ b/src/app/Fake.Documentation.DocFx/paket.references @@ -0,0 +1,4 @@ +group netcore + +FSharp.Core +NETStandard.Library diff --git a/src/legacy/FakeLib/DocFxHelper.fs b/src/legacy/FakeLib/DocFxHelper.fs index e5d1bf7fec2..4f2b6a7d98f 100644 --- a/src/legacy/FakeLib/DocFxHelper.fs +++ b/src/legacy/FakeLib/DocFxHelper.fs @@ -1,9 +1,11 @@ /// Contains helper functions to run the documentation tool "docfx". +[] module Fake.DocFxHelper open System /// The parameter type for DocFx. +[] [] type DocFxParams = { /// The tool path - FAKE tries to find docfx.exe automatically in any sub folder. @@ -19,6 +21,7 @@ type DocFxParams = } /// The default parameters +[] let DocFxDefaults = let toolPath = findToolInSubPath "docfx.exe" (currentDirectory @@ "tools" @@ "docfx.msbuild") let docsPath = currentDirectory @@ "docs" @@ -39,6 +42,7 @@ let DocFxDefaults = /// DocFxJson = "foo" @@ "bar" @@ "docfx.json" /// Timeout = TimeSpan.FromMinutes 10. /// }) +[] let DocFx setParams = let parameters = DocFxDefaults |> setParams diff --git a/src/legacy/FakeLib/FakeLib.fsproj b/src/legacy/FakeLib/FakeLib.fsproj index a17238d80a9..9f225b17913 100644 --- a/src/legacy/FakeLib/FakeLib.fsproj +++ b/src/legacy/FakeLib/FakeLib.fsproj @@ -379,6 +379,9 @@ Fake.Api.HockeyApp\HockeyApp.fs + + Fake.Documentation.DocFx\DocFx.fs + @@ -2664,4 +2667,4 @@ - \ No newline at end of file +