Skip to content

Commit

Permalink
Generate seperate API documentation for FAKE 5 and FAKE 4
Browse files Browse the repository at this point in the history
  • Loading branch information
kblohm committed Apr 28, 2018
1 parent 7f99a9c commit 0638e17
Show file tree
Hide file tree
Showing 37 changed files with 323 additions and 179 deletions.
2 changes: 1 addition & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Visual Studio or MonoDevelop, which provide syntax highlighting and code complet

The new DSL was designed to be succinct, typed, declarative, extensible and easy to use.

See the [project home page](http://fsharp.github.com/FAKE/) for tutorials and [API documentation](http://fsharp.github.io/FAKE/apidocs/index.html).
See the [project home page](http://fsharp.github.com/FAKE/) for tutorials and [API documentation](http://fsharp.github.io/FAKE/apidocs/v5/index.html).

# Build the project

Expand Down
2 changes: 1 addition & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,7 @@
* Added ZipHelper.ZipOfIncludes - https://github.com/fsharp/FAKE/pull/686
* Added AppVeyorEnvironment.RepoTag & .RepoTagName - https://github.com/fsharp/FAKE/pull/685
* New tutorial about Azure Cloud Service - http://fsharp.github.io/FAKE/azurecloudservices.html
* Added basic support for creating Azure Cloud Services - http://fsharp.github.io/FAKE/apidocs/fake-azure-cloudservices.html
* Added basic support for creating Azure Cloud Services - http://fsharp.github.io/FAKE/apidocs/v5/fake-azure-cloudservices.html
* Added metadata property for AssemblyInfoReplacementParams - https://github.com/fsharp/FAKE/pull/675

## 3.18.0 - 2015-03-04
Expand Down
42 changes: 32 additions & 10 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ open System.Reflection
//let execContext = Fake.Core.Context.FakeExecutionContext.Create false "build.fsx" []
//Fake.Core.Context.setExecutionContext (Fake.Core.Context.RuntimeContext.Fake execContext)
//#endif

#load "src/app/Fake.DotNet.FSFormatting/FSFormatting.fs"
open System.IO
open Fake.Api
open Fake.Core
Expand Down Expand Up @@ -388,8 +388,10 @@ Target.create "GenerateDocs" (fun _ ->
"project-nuget", "https://www.nuget.org/packages/FAKE"
"root", "http://fsharp.github.io/FAKE"
"project-name", "FAKE - F# Make" ]
let layoutroots = [ "./help/templates"; "./help/templates/reference" ]

let layoutRoots = [ "./help/templates"; "./help/templates/reference"]
let fake5LayoutRoots = "./help/templates/fake5" :: layoutRoots
let legacyLayoutRoots = "./help/templates/legacy" :: layoutRoots
#if BOOTSTRAP
Shell.copyDir (docsDir) "help/content" FileFilter.allFiles
#else
Expand All @@ -410,24 +412,44 @@ Target.create "GenerateDocs" (fun _ ->
OutputDirectory = docsDir
Template = docsTemplate
ProjectParameters = ("CurrentPage", "Modules") :: projInfo
LayoutRoots = layoutroots })
LayoutRoots = layoutRoots })
FSFormatting.createDocs (fun s ->
{ s with
Source = source @@ "redirects"
OutputDirectory = docsDir
Template = docsTemplate
ProjectParameters = ("CurrentPage", "FAKE-4") :: projInfo
LayoutRoots = layoutroots })
LayoutRoots = layoutRoots })
FSFormatting.createDocs (fun s ->
{ s with
Source = source @@ "startpage"
OutputDirectory = docsDir
Template = indexTemplate
// TODO: CurrentPage shouldn't be required as it's written in the template, but it is -> investigate
ProjectParameters = ("CurrentPage", "Home") :: projInfo
LayoutRoots = layoutroots })
LayoutRoots = layoutRoots })

Directory.ensure apidocsDir

// FAKE 5 module documentation
let fake5ApidocsDir = apidocsDir @@ "v5"
Directory.ensure fake5ApidocsDir
let fake5Dlls =
!! "./src/app/Fake.*/bin/Release/**/Fake.*.dll"
|> Seq.distinctBy Path.GetFileName
fake5Dlls
|> FSFormatting.createDocsForDlls (fun s ->
{ s with
OutputDirectory = fake5ApidocsDir
LayoutRoots = fake5LayoutRoots
// TODO: CurrentPage shouldn't be required as it's written in the template, but it is -> investigate
ProjectParameters = ("CurrentPage", "APIReference") :: projInfo
SourceRepository = githubLink + "/blob/master" })

let dllFiles =
// FAKE 5 legacy documentation
let fake5LegacyApidocsDir = apidocsDir @@ "v5/legacy"
Directory.ensure fake5LegacyApidocsDir
let fake5LegacyDlls =
!! "./build/**/Fake.*.dll"
++ "./build/FakeLib.dll"
-- "./build/**/Fake.Experimental.dll"
Expand All @@ -436,13 +458,13 @@ Target.create "GenerateDocs" (fun _ ->
-- "./build/**/FAKE.FSharp.Compiler.Service.dll"
-- "./build/**/Fake.IIS.dll"
-- "./build/**/Fake.Deploy.Lib.dll"
|> Seq.distinctBy Path.GetFileName

Directory.ensure apidocsDir
dllFiles
fake5LegacyDlls
|> FSFormatting.createDocsForDlls (fun s ->
{ s with
OutputDirectory = apidocsDir
LayoutRoots = layoutroots
OutputDirectory = fake5LegacyApidocsDir
LayoutRoots = legacyLayoutRoots
LibDirs = [ "./build" ]
// TODO: CurrentPage shouldn't be required as it's written in the template, but it is -> investigate
ProjectParameters = ("CurrentPage", "APIReference") :: projInfo
Expand Down
223 changes: 154 additions & 69 deletions help/literate/templates/template-project.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>

<head>
<meta charset="utf-8">
<!--
The {page-title} parameters will be replaced with the
Expand All @@ -22,75 +23,159 @@
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
</head>

<body>
<div class="container">
<div class="masthead">
<ul class="nav nav-pills pull-right">
<li><a href="http://fsharp.org">fsharp.org</a></li>
<li><a href="{github-link}">github page</a></li>
</ul>
<h3 class="muted">{project-name}</h3>
</div>
<hr />
<div class="row">
<div class="span9" id="main">
{document}
{tooltips}
<div class="masthead">
<ul class="nav nav-pills pull-right">
<li>
<a href="http://fsharp.org">fsharp.org</a>
</li>
<li>
<a href="{github-link}">github page</a>
</li>
</ul>
<h3 class="muted">{project-name}</h3>
</div>
<div class="span3">
<a href="index.html">
<img src="pics/logo.png" style="width:140px;height:140px;margin:10px 0px 0px 35px;border-style:none;" />
</a>
<ul class="nav nav-list" id="menu">
<li class="nav-header">{project-name}</li>
<li><a href="index.html">Home page</a></li>
<li class="divider"></li>
<li><a href="https://nuget.org/packages/Fake">Get FAKE via NuGet</a></li>
<li><a href="{github-link}">Source Code on GitHub</a></li>
<li><a href="https://github.com/fsharp/FAKE/blob/master/License.txt">License (Apache 2)</a></li>
<li><a href="RELEASE_NOTES.html">Release Notes</a></li>
<li><a href="contributing.html">Contributing to FAKE</a></li>
<li><a href="users.html">Who is using FAKE?</a></li>
<li><a href="http://stackoverflow.com/questions/tagged/f%23-fake">Ask a question</a></li>
<li class="nav-header">Tutorials</li>
<li><a href="gettingstarted.html">Getting started</a></li>
<li><a href="cache.html">Build script caching</a></li>
<li class="divider"></li>
<li><a href="nuget.html">NuGet package restore</a></li>
<li><a href="fxcop.html">Using FxCop in a build</a></li>
<li><a href="assemblyinfo.html">Generating AssemblyInfo</a></li>
<li><a href="create-nuget-package.html">Create NuGet packages</a></li>
<li><a href="specifictargets.html">Running specific targets</a></li>
<li><a href="commandline.html">Running FAKE from command line</a></li>
<li><a href="parallel-build.html">Running targets in parallel</a></li>
<li><a href="fsc.html">Using the F# compiler from FAKE</a></li>
<li><a href="customtasks.html">Creating custom tasks</a></li>
<li><a href="soft-dependencies.html">Soft dependencies</a></li>
<li><a href="teamcity.html">TeamCity integration</a></li>
<li><a href="canopy.html">Running canopy tests</a></li>
<li><a href="octopusdeploy.html">Octopus Deploy</a></li>
<li><a href="typescript.html">TypeScript support</a></li>
<li><a href="azurewebjobs.html">Azure WebJobs support</a></li>
<li><a href="azurecloudservices.html">Azure Cloud Services support</a></li>
<li><a href="dacpac.html">SQL DACPAC support</a></li>
<li><a href="fluentmigrator.html">FluentMigrator support</a></li>
<li><a href="androidpublisher.html">Android publisher</a></li>
<li><a href="watch.html">File Watcher</a></li>
<li><a href="wix.html">WiX Setup Generation</a></li>
<li><a href="chocolatey.html">Using Chocolatey</a></li>
<li><a href="slacknotification.html">Using Slack</a></li>
<li><a href="msteamsnotification.html">Using Microsoft Teams</a></li>
<li><a href="sonarcube.html">Using SonarQube</a></li>
<li class="divider"></li>
<li><a href="deploy.html">Fake.Deploy</a></li>
<li><a href="iis.html">Fake.IIS</a></li>
<li class="nav-header">Reference</li>
<li><a href="apidocs/index.html">API Reference</a></li>
</ul>
<hr />
<div class="row">
<div class="span9" id="main">
{document} {tooltips}
</div>
<div class="span3">
<a href="index.html">
<img src="pics/logo.png" style="width:140px;height:140px;margin:10px 0px 0px 35px;border-style:none;" />
</a>
<ul class="nav nav-list" id="menu">
<li class="nav-header">{project-name}</li>
<li>
<a href="index.html">Home page</a>
</li>
<li class="divider"></li>
<li>
<a href="https://nuget.org/packages/Fake">Get FAKE via NuGet</a>
</li>
<li>
<a href="{github-link}">Source Code on GitHub</a>
</li>
<li>
<a href="https://github.com/fsharp/FAKE/blob/master/License.txt">License (Apache 2)</a>
</li>
<li>
<a href="RELEASE_NOTES.html">Release Notes</a>
</li>
<li>
<a href="contributing.html">Contributing to FAKE</a>
</li>
<li>
<a href="users.html">Who is using FAKE?</a>
</li>
<li>
<a href="http://stackoverflow.com/questions/tagged/f%23-fake">Ask a question</a>
</li>
<li class="nav-header">Tutorials</li>
<li>
<a href="gettingstarted.html">Getting started</a>
</li>
<li>
<a href="cache.html">Build script caching</a>
</li>
<li class="divider"></li>
<li>
<a href="nuget.html">NuGet package restore</a>
</li>
<li>
<a href="fxcop.html">Using FxCop in a build</a>
</li>
<li>
<a href="assemblyinfo.html">Generating AssemblyInfo</a>
</li>
<li>
<a href="create-nuget-package.html">Create NuGet packages</a>
</li>
<li>
<a href="specifictargets.html">Running specific targets</a>
</li>
<li>
<a href="commandline.html">Running FAKE from command line</a>
</li>
<li>
<a href="parallel-build.html">Running targets in parallel</a>
</li>
<li>
<a href="fsc.html">Using the F# compiler from FAKE</a>
</li>
<li>
<a href="customtasks.html">Creating custom tasks</a>
</li>
<li>
<a href="soft-dependencies.html">Soft dependencies</a>
</li>
<li>
<a href="teamcity.html">TeamCity integration</a>
</li>
<li>
<a href="canopy.html">Running canopy tests</a>
</li>
<li>
<a href="octopusdeploy.html">Octopus Deploy</a>
</li>
<li>
<a href="typescript.html">TypeScript support</a>
</li>
<li>
<a href="azurewebjobs.html">Azure WebJobs support</a>
</li>
<li>
<a href="azurecloudservices.html">Azure Cloud Services support</a>
</li>
<li>
<a href="dacpac.html">SQL DACPAC support</a>
</li>
<li>
<a href="fluentmigrator.html">FluentMigrator support</a>
</li>
<li>
<a href="androidpublisher.html">Android publisher</a>
</li>
<li>
<a href="watch.html">File Watcher</a>
</li>
<li>
<a href="wix.html">WiX Setup Generation</a>
</li>
<li>
<a href="chocolatey.html">Using Chocolatey</a>
</li>
<li>
<a href="slacknotification.html">Using Slack</a>
</li>
<li>
<a href="msteamsnotification.html">Using Microsoft Teams</a>
</li>
<li>
<a href="sonarcube.html">Using SonarQube</a>
</li>
<li class="divider"></li>
<li>
<a href="deploy.html">Fake.Deploy</a>
</li>
<li>
<a href="iis.html">Fake.IIS</a>
</li>
<li class="nav-header">Reference</li>
<li>
<a href="apidocs/v5/index.html">API Reference</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<a href="{github-link}"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png" alt="Fork me on GitHub"></a>
</body>
</html>
<a href="{github-link}">
<img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png"
alt="Fork me on GitHub">
</a>
</body>

</html>
2 changes: 1 addition & 1 deletion help/markdown/api-slack.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ In this article you will learn how to create a [Slack](https://slack.com) webhoo

**Note: This documentation is for FAKE 5. The old documentation can be found [here](legacy-slacknotification.html)! **

[API-Reference](apidocs/fake-api-slack.html)
[API-Reference](apidocs/v5/fake-api-slack.html)

## Adding a Webhook Integration to a Channel

Expand Down
2 changes: 1 addition & 1 deletion help/markdown/core-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**Note: This documentation is for FAKE 5! **

[API-Reference](apidocs/fake-core-process.html)
[API-Reference](apidocs/v5/fake-core-process.html)

## Running a command and analyse results

Expand Down
2 changes: 1 addition & 1 deletion help/markdown/core-targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**Note: This documentation is for FAKE 5. The old documentation can be found [here](legacy-core-targets.html)! **

[API-Reference](apidocs/fake-core-target.html), [Operators](apidocs/fake-core-targetoperators.html)
[API-Reference](apidocs/v5/fake-core-target.html), [Operators](apidocs/v5/fake-core-targetoperators.html)

## Command line interface for the target module

Expand Down
2 changes: 1 addition & 1 deletion help/markdown/core-trace.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Fake.Core.Trace module

[API-Reference](apidocs/fake-core-trace.html)
[API-Reference](apidocs/v5/fake-core-trace.html)

## Logging and Tracing

Expand Down
4 changes: 2 additions & 2 deletions help/markdown/core.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

This namespace bundles some "core" modules which are useful in most scenarios where FAKE is used.

- [Targets](core-targets.html), [API-Reference](apidocs/fake-core-targetmodule.html), [Operators](apidocs/fake-core-targetoperators.html)
- To be continued...
- [Targets](core-targets.html), [API-Reference](apidocs/v5/fake-core-targetmodule.html), [Operators](apidocs/v5/fake-core-targetoperators.html)
- To be continued...
2 changes: 1 addition & 1 deletion help/markdown/dotnet-assemblyinfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Target.create "BuildApp" (fun _ ->
)
```

As you can see generating an AssemblyInfo.cs file is pretty easy with FAKE. You can read more about the C# and F# AssemblyInfo tasks in the [API docs](apidocs/fake-assemblyinfofile.html).
As you can see generating an AssemblyInfo.cs file is pretty easy with FAKE. You can read more about the C# and F# AssemblyInfo tasks in the [API docs](apidocs/v5/fake-assemblyinfofile.html).

## Setting the version no.

Expand Down
Loading

0 comments on commit 0638e17

Please sign in to comment.