From 265feb09e193c008db95cb8d5d768243740b655c Mon Sep 17 00:00:00 2001 From: Jack Fox Date: Sat, 10 Jun 2017 09:43:19 -0700 Subject: [PATCH] merge master --- .gitignore | 12 ++--- FSharp.ProjectScaffold.sln | 4 +- build.template | 51 +++++++----------- docs/output/README.md | 17 ------ {docs => docsraw}/content/index.fsx | 0 {docs => docsraw}/content/tutorial.fsx | 0 {docs => docsraw}/files/img/logo-template.pdn | Bin {docs => docsraw}/files/img/logo.png | Bin {docs => docsraw}/tools/generate.template | 8 +-- .../tools/templates/template.cshtml | 0 init.fsx | 2 +- 11 files changed, 28 insertions(+), 66 deletions(-) delete mode 100644 docs/output/README.md rename {docs => docsraw}/content/index.fsx (100%) rename {docs => docsraw}/content/tutorial.fsx (100%) rename {docs => docsraw}/files/img/logo-template.pdn (100%) rename {docs => docsraw}/files/img/logo.png (100%) rename {docs => docsraw}/tools/generate.template (95%) rename {docs => docsraw}/tools/templates/template.cshtml (100%) diff --git a/.gitignore b/.gitignore index 94fc64f..97d3db2 100644 --- a/.gitignore +++ b/.gitignore @@ -169,12 +169,6 @@ $RECYCLE.BIN/ # NuGet Packages Directory packages/ -# Generated documentation folder -docs/output/ - -# Temp folder used for publishing docs -temp/ - # Test results produced by build TestResults.xml @@ -186,7 +180,7 @@ localpackages/ paket-files *.orig .paket/paket.exe -docs/content/license.md -docs/content/release-notes.md +docsraw/content/license.md +docsraw/content/release-notes.md .fake -docs/tools/FSharp.Formatting.svclog +docsraw/tools/FSharp.Formatting.svclog diff --git a/FSharp.ProjectScaffold.sln b/FSharp.ProjectScaffold.sln index 94710c4..2fcbd37 100644 --- a/FSharp.ProjectScaffold.sln +++ b/FSharp.ProjectScaffold.sln @@ -26,8 +26,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{83F16175 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "content", "content", "{8E6D5255-776D-4B61-85F9-73C37AA1FB9A}" ProjectSection(SolutionItems) = preProject - docs\content\index.fsx = docs\content\index.fsx - docs\content\tutorial.fsx = docs\content\tutorial.fsx + docsraw\content\index.fsx = docsraw\content\index.fsx + docsraw\content\tutorial.fsx = docsraw\content\tutorial.fsx EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{ED8079DD-2B06-4030-9F0F-DC548F98E1C4}" diff --git a/build.template b/build.template index e5b3c90..1edf9f7 100644 --- a/build.template +++ b/build.template @@ -21,7 +21,7 @@ open System.Diagnostics // - for version and project name in generated AssemblyInfo file // - by the generated NuGet package // - to run tests and to publish documentation on GitHub gh-pages -// - for documentation, you also need to edit info in "docs/tools/generate.fsx" +// - for documentation, you also need to edit info in "docsraw/tools/generate.fsx" // The name of the project // (used by attributes in AssemblyInfo, name of a NuGet package and directory in 'src') @@ -128,7 +128,7 @@ let vsProjProps = Target "Clean" (fun _ -> !! solutionFile |> MSBuildReleaseExt "" vsProjProps "Clean" |> ignore - CleanDirs ["bin"; "temp"; "docs/output"] + CleanDirs ["bin"; "temp"; "docs"] ) // -------------------------------------------------------------------------------------- @@ -201,7 +201,7 @@ let executeFAKEWithOutput workingDirectory script fsiargs envArgs = // Documentation let buildDocumentationTarget fsiargs target = trace (sprintf "Building documentation (%s), this could take some time, please wait..." target) - let exit = executeFAKEWithOutput "docs/tools" "generate.fsx" fsiargs ["target", target] + let exit = executeFAKEWithOutput "docsraw/tools" "generate.fsx" fsiargs ["target", target] if exit <> 0 then failwith "generating reference documentation failed" () @@ -225,31 +225,31 @@ let generateHelp fail = generateHelp' fail false Target "GenerateHelp" (fun _ -> - DeleteFile "docs/content/release-notes.md" - CopyFile "docs/content/" "RELEASE_NOTES.md" - Rename "docs/content/release-notes.md" "docs/content/RELEASE_NOTES.md" + DeleteFile "docsraw/content/release-notes.md" + CopyFile "docsraw/content/" "RELEASE_NOTES.md" + Rename "docsraw/content/release-notes.md" "docsraw/content/RELEASE_NOTES.md" - DeleteFile "docs/content/license.md" - CopyFile "docs/content/" "LICENSE.txt" - Rename "docs/content/license.md" "docs/content/LICENSE.txt" + DeleteFile "docsraw/content/license.md" + CopyFile "docsraw/content/" "LICENSE.txt" + Rename "docsraw/content/license.md" "docsraw/content/LICENSE.txt" generateHelp true ) Target "GenerateHelpDebug" (fun _ -> - DeleteFile "docs/content/release-notes.md" - CopyFile "docs/content/" "RELEASE_NOTES.md" - Rename "docs/content/release-notes.md" "docs/content/RELEASE_NOTES.md" + DeleteFile "docsraw/content/release-notes.md" + CopyFile "docsraw/content/" "RELEASE_NOTES.md" + Rename "docsraw/content/release-notes.md" "docsraw/content/RELEASE_NOTES.md" - DeleteFile "docs/content/license.md" - CopyFile "docs/content/" "LICENSE.txt" - Rename "docs/content/license.md" "docs/content/LICENSE.txt" + DeleteFile "docsraw/content/license.md" + CopyFile "docsraw/content/" "LICENSE.txt" + Rename "docsraw/content/license.md" "docsraw/content/LICENSE.txt" generateHelp' true true ) Target "KeepRunning" (fun _ -> - use watcher = !! "docs/content/**/*.*" |> WatchChanges (fun changes -> + use watcher = !! "docsraw/content/**/*.*" |> WatchChanges (fun changes -> generateHelp' true true ) @@ -273,7 +273,7 @@ F# Project Scaffold ({0}) ========================= *) """ - let targetDir = "docs/content" lang + let targetDir = "docsraw/content" lang let targetFile = targetDir "index.fsx" ensureDirectory targetDir System.IO.File.WriteAllText(targetFile, System.String.Format(content, lang)) @@ -289,7 +289,7 @@ Target "AddLangDocs" (fun _ -> failwithf "Language must be 2 or 3 characters (ex. 'de', 'fr', 'ja', 'gsw', etc.): %s" lang let templateFileName = "template.cshtml" - let templateDir = "docs/tools/templates" + let templateDir = "docsraw/tools/templates" let langTemplateDir = templateDir lang let langTemplateFileName = langTemplateDir templateFileName @@ -305,17 +305,6 @@ Target "AddLangDocs" (fun _ -> // -------------------------------------------------------------------------------------- // Release Scripts -Target "ReleaseDocs" (fun _ -> - let tempDocsDir = "temp/gh-pages" - CleanDir tempDocsDir - Repository.cloneSingleBranch "" (gitHome + "/" + gitName + ".git") "gh-pages" tempDocsDir - - CopyRecursive "docs/output" tempDocsDir true |> tracefn "%A" - StageAll tempDocsDir - Git.Commit.Commit tempDocsDir (sprintf "Update generated documentation for version %s" release.NugetVersion) - Branches.push tempDocsDir -) - #load "paket-files/build/fsharp/FAKE/modules/Octokit/Octokit.fsx" open Octokit @@ -365,7 +354,6 @@ Target "All" DoNothing ==> "NuGet" ==> "BuildPackage" ==> "All" - =?> ("ReleaseDocs",isLocalBuild) "GenerateHelp" ==> "GenerateReferenceDocs" @@ -381,7 +369,4 @@ Target "All" DoNothing ==> "PublishNuget" ==> "Release" -"ReleaseDocs" - ==> "Release" - RunTargetOrDefault "All" diff --git a/docs/output/README.md b/docs/output/README.md deleted file mode 100644 index fae92c5..0000000 --- a/docs/output/README.md +++ /dev/null @@ -1,17 +0,0 @@ -This file is in the `docs/output` directory. - -This directory will contain the final artifacts for both narrative and API documentation. -This folder will be automatically created by the documenation generation process. - -**It is strongly recommended that nothing be put into this directory.** - -It is **strongly advised** that the **contents of this directory not be committed** to source control -(with the sole exception being this `README.md` file). - ---- - -NOTE: - -This file is a placeholder, used to preserve directory structure in Git. - -This file does not need to be edited. diff --git a/docs/content/index.fsx b/docsraw/content/index.fsx similarity index 100% rename from docs/content/index.fsx rename to docsraw/content/index.fsx diff --git a/docs/content/tutorial.fsx b/docsraw/content/tutorial.fsx similarity index 100% rename from docs/content/tutorial.fsx rename to docsraw/content/tutorial.fsx diff --git a/docs/files/img/logo-template.pdn b/docsraw/files/img/logo-template.pdn similarity index 100% rename from docs/files/img/logo-template.pdn rename to docsraw/files/img/logo-template.pdn diff --git a/docs/files/img/logo.png b/docsraw/files/img/logo.png similarity index 100% rename from docs/files/img/logo.png rename to docsraw/files/img/logo.png diff --git a/docs/tools/generate.template b/docsraw/tools/generate.template similarity index 95% rename from docs/tools/generate.template rename to docsraw/tools/generate.template index 6aeed5b..ab509ca 100644 --- a/docs/tools/generate.template +++ b/docsraw/tools/generate.template @@ -1,6 +1,6 @@ // -------------------------------------------------------------------------------------- -// Builds the documentation from `.fsx` and `.md` files in the 'docs/content' directory -// (the generated documentation is stored in the 'docs/output' directory) +// Builds the documentation from `.fsx` and `.md` files in the 'docsraw/content' directory +// (the generated documentation is stored in the 'docsraw/output' directory) // -------------------------------------------------------------------------------------- // Binaries that have XML documentation (in a corresponding generated XML file) @@ -41,13 +41,13 @@ open FSharp.MetadataFormat #if RELEASE let root = website #else -let root = "file://" + (__SOURCE_DIRECTORY__ @@ "../output") +let root = "file://" + (__SOURCE_DIRECTORY__ @@ "../../docs") #endif // Paths with template/source/output locations let bin = __SOURCE_DIRECTORY__ @@ "../../bin" let content = __SOURCE_DIRECTORY__ @@ "../content" -let output = __SOURCE_DIRECTORY__ @@ "../output" +let output = __SOURCE_DIRECTORY__ @@ "../../docs" let files = __SOURCE_DIRECTORY__ @@ "../files" let templates = __SOURCE_DIRECTORY__ @@ "templates" let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/build/FSharp.Formatting/" diff --git a/docs/tools/templates/template.cshtml b/docsraw/tools/templates/template.cshtml similarity index 100% rename from docs/tools/templates/template.cshtml rename to docsraw/tools/templates/template.cshtml diff --git a/init.fsx b/init.fsx index e6e6c17..508f1ff 100644 --- a/init.fsx +++ b/init.fsx @@ -235,7 +235,7 @@ let generate templatePath generatedFilePath = print (sprintf "# Generated %s" generatedFilePath) generate (localFile "build.template") (localFile "build.fsx") -generate (localFile "docs/tools/generate.template") (localFile "docs/tools/generate.fsx") +generate (localFile "docsraw/tools/generate.template") (localFile "docsraw/tools/generate.fsx") //Handle source control let isGitRepo () =