Browse Source

Docs: include release notes and license

provider
Christoph Ruegg 13 years ago
parent
commit
ccf8d19ad2
  1. 2
      RELEASENOTES.md
  2. 56
      docs/tools/build-docs.fsx
  3. 4
      docs/tools/templates/template.cshtml

2
RELEASENOTES.md

@ -11,7 +11,7 @@
* Statistics: DescriptiveStatistics support for larger datasets. * Statistics: DescriptiveStatistics support for larger datasets.
* MKL: native providers must not require MFC to compile. * MKL: native providers must not require MFC to compile.
* Sorting helpers support sub-range sorting, use insertion sort on very small sets. * Sorting helpers support sub-range sorting, use insertion sort on very small sets.
* Build: extend usage of FAKE, automate docs, api and NuGet package generation. * Build: extend usage of FAKE, automate docs, api, Zip and NuGet package generation.
* Portable: replace PCL profile 136 with profile 344, support for WP8.1 * Portable: replace PCL profile 136 with profile 344, support for WP8.1
* Xamarin: prepare for better Xamarin Android/iOS support and for adding to the Xamarin store (free). * Xamarin: prepare for better Xamarin Android/iOS support and for adding to the Xamarin store (free).
* Misc code style fixes. * Misc code style fixes.

56
docs/tools/build-docs.fsx

@ -46,6 +46,7 @@ let root = "file://" + (__SOURCE_DIRECTORY__ @@ "../../out/docs")
#endif #endif
// Paths with template/source/output locations // Paths with template/source/output locations
let top = __SOURCE_DIRECTORY__ @@ "../../"
let bin = __SOURCE_DIRECTORY__ @@ "../../out/lib/Net40" let bin = __SOURCE_DIRECTORY__ @@ "../../out/lib/Net40"
let content = __SOURCE_DIRECTORY__ @@ "../content" let content = __SOURCE_DIRECTORY__ @@ "../content"
let output = __SOURCE_DIRECTORY__ @@ "../../out/docs" let output = __SOURCE_DIRECTORY__ @@ "../../out/docs"
@ -56,34 +57,45 @@ let docTemplate = formatting @@ "templates/docpage.cshtml"
// Where to look for *.csproj templates (in this order) // Where to look for *.csproj templates (in this order)
let layoutRoots = let layoutRoots =
[ templates; formatting @@ "templates" [ templates
formatting @@ "templates/reference" ] formatting @@ "templates"
formatting @@ "templates/reference" ]
let extraDocs =
[ "RELEASENOTES.md", "ReleaseNotes.md"
"LICENSE.md", "License.md" ]
// Copy static files and CSS + JS from F# Formatting // Copy static files and CSS + JS from F# Formatting
let copyFiles () = let copyFiles() =
CopyRecursive files output true |> Log "Copying file: " CopyRecursive files output true |> Log "Copying file: "
ensureDirectory (output @@ "content") ensureDirectory (output @@ "content")
CopyRecursive (formatting @@ "styles") (output @@ "content") true CopyRecursive (formatting @@ "styles") (output @@ "content") true |> Log "Copying styles and scripts: "
|> Log "Copying styles and scripts: "
// Build API reference from XML comments // Build API reference from XML comments
let buildReference () = let buildReference() =
CleanDir (output @@ "reference") CleanDir(output @@ "reference")
for lib in referenceBinaries do for lib in referenceBinaries do
MetadataFormat.Generate MetadataFormat.Generate
( bin @@ lib, output @@ "reference", layoutRoots, (bin @@ lib, output @@ "reference", layoutRoots, parameters = ("root", root) :: info,
parameters = ("root", root)::info, sourceRepo = "https://github.com/mathnet/mathnet-numerics/tree/master/src", sourceFolder = @"..\..\src",
sourceRepo = "https://github.com/mathnet/mathnet-numerics/tree/master/src", publicOnly = true)
sourceFolder = @"..\..\src", publicOnly = true)
// Build documentation from `fsx` and `md` files in `docs/content` // Build documentation from `fsx` and `md` files in `docs/content`
let buildDocumentation () = let buildDocumentation() =
let subdirs = Directory.EnumerateDirectories(content, "*", SearchOption.AllDirectories) for (fileName, docName) in extraDocs do CopyFile (content @@ docName) (top @@ fileName)
for dir in Seq.append [content] subdirs do let subdirs = Directory.EnumerateDirectories(content, "*", SearchOption.AllDirectories)
let sub = if dir.Length > content.Length then dir.Substring(content.Length + 1) else "." for dir in Seq.append [ content ] subdirs do
Literate.ProcessDirectory let sub = if dir.Length > content.Length then dir.Substring(content.Length + 1) else "."
( dir, docTemplate, output @@ sub, replacements = ("root", root)::info, Literate.ProcessDirectory
layoutRoots = layoutRoots, references=false, lineNumbers=true ) (dir, docTemplate, output @@ sub, replacements = ("root", root) :: info, layoutRoots = layoutRoots,
references = false, lineNumbers = true)
for (_, docName) in extraDocs do DeleteFile (content @@ docName)
// Generate
copyFiles()
buildDocumentation()
//buildReference()
// Generate // Generate
copyFiles() copyFiles()

4
docs/tools/templates/template.cshtml

@ -45,9 +45,9 @@
<li class="nav-header">Math.NET Numerics</li> <li class="nav-header">Math.NET Numerics</li>
<li><a href="http://numerics.mathdotnet.com">Project Website</a></li> <li><a href="http://numerics.mathdotnet.com">Project Website</a></li>
<li><a href="https://github.com/mathnet/mathnet-numerics/blob/master/RELEASENOTES.md">Release Notes</a></li> <li><a href="@Root/ReleaseNotes.html">Release Notes</a></li>
<li><a href="https://github.com/mathnet/mathnet-numerics/blob/master/CONTRIBUTING.md">Contributing</a></li> <li><a href="https://github.com/mathnet/mathnet-numerics/blob/master/CONTRIBUTING.md">Contributing</a></li>
<li><a href="http://mathnetnumerics.codeplex.com/license">MIT/X11 License</a></li> <li><a href="@Root/License.html">MIT/X11 License</a></li>
<li><a href="http://numerics.mathdotnet.com/api/">Class Reference</a></li> <li><a href="http://numerics.mathdotnet.com/api/">Class Reference</a></li>
<li class="nav-header">Getting Started</li> <li class="nav-header">Getting Started</li>

Loading…
Cancel
Save