Browse Source

Build: dependencies & tools upgrade, docs build updated

cuda
Christoph Ruegg 12 years ago
parent
commit
bc5165ab43
  1. 59
      docs/tools/build-docs.fsx
  2. 18
      docs/tools/templates/template.cshtml
  3. 14
      paket.lock

59
docs/tools/build-docs.fsx

@ -7,28 +7,23 @@
let referenceBinaries = [ "MathNet.Numerics.dll"; "MathNet.Numerics.FSharp.dll" ]
// Web site location for the generated documentation
let website = "http://numerics.mathdotnet.com/docs"
let githubLink = "http://github.com/mathnet/mathnet-numerics"
// Specify more information about your project
let info =
[ "project-name", "Math.NET Numerics"
"project-author", "Christoph Ruegg, Marcus Cuda, Jurgen Van Gael"
"project-summary", "Math.NET Numerics, providing methods and algorithms for numerical computations in science, engineering and every day use. .Net 4, .Net 3.5, SL5, Win8, WP8, PCL 47 and 136, Mono, Xamarin Android/iOS."
"project-github", "http://github.com/mathnet/mathnet-numerics"
"project-github", githubLink
"project-nuget", "http://nuget.com/packages/MathNet.Numerics" ]
// --------------------------------------------------------------------------------------
// For typical project, no changes are needed below
// --------------------------------------------------------------------------------------
#I "../../packages/FSharp.Formatting/lib/net40"
#I "../../packages/RazorEngine/lib/net40"
#I "../../packages/FSharp.Compiler.Service/lib/net40"
#r "../../packages/Microsoft.AspNet.Razor/lib/net40/System.Web.Razor.dll"
#load "../../packages/FSharp.Formatting/FSharp.Formatting.fsx"
#r "../../packages/FAKE/tools/NuGet.Core.dll"
#r "../../packages/FAKE/tools/FakeLib.dll"
#r "RazorEngine.dll"
#r "FSharp.Literate.dll"
#r "FSharp.CodeFormat.dll"
#r "FSharp.MetadataFormat.dll"
open Fake
open System
@ -62,31 +57,39 @@ let layoutRoots =
formatting @@ "templates/reference" ]
// Copy static files and CSS + JS from F# Formatting
let copySupportFiles() =
CopyRecursive files output true |> Log "Copying file: "
ensureDirectory (output @@ "content")
CopyRecursive (formatting @@ "styles") (output @@ "content") true |> Log "Copying styles and scripts: "
let copyFiles() =
CopyRecursive files output true |> Log "Copying file: "
ensureDirectory (output @@ "content")
CopyRecursive (formatting @@ "styles") (output @@ "content") true
|> Log "Copying styles and scripts: "
// Build API reference from XML comments
let buildReference() =
CleanDir(output @@ "reference")
for lib in referenceBinaries do
MetadataFormat.Generate
(bin @@ lib, output @@ "reference", layoutRoots, parameters = ("root", root) :: info,
sourceRepo = "https://github.com/mathnet/mathnet-numerics/tree/master/src", sourceFolder = @"..\..\src",
publicOnly = true, libDirs = [bin])
let buildReference () =
CleanDir (output @@ "reference")
let binaries =
referenceBinaries
|> List.map (fun lib-> bin @@ lib)
MetadataFormat.Generate
( binaries, output @@ "reference", layoutRoots,
parameters = ("root", root)::info,
sourceRepo = githubLink @@ "tree/master",
sourceFolder = __SOURCE_DIRECTORY__ @@ ".." @@ "..",
publicOnly = true, libDirs = [bin] )
// Build documentation from `fsx` and `md` files in `docs/content`
let buildDocumentation() =
let subdirs = Directory.EnumerateDirectories(content, "*", SearchOption.AllDirectories)
for dir in Seq.append [ content ] subdirs do
let sub = if dir.Length > content.Length then dir.Substring(content.Length + 1) else "."
Literate.ProcessDirectory
(dir, docTemplate, output @@ sub, replacements = ("root", root) :: info, layoutRoots = layoutRoots,
references = false, lineNumbers = true, generateAnchors = true)
let subdirs = Directory.EnumerateDirectories(content, "*", SearchOption.AllDirectories)
for dir in Seq.append [content] subdirs do
let sub = if dir.Length > content.Length then dir.Substring(content.Length + 1) else "."
Literate.ProcessDirectory
( dir, docTemplate, output @@ sub, replacements = ("root", root)::info,
layoutRoots = layoutRoots,
references = false,
lineNumbers = true,
generateAnchors = true )
// Generate
copySupportFiles()
buildDocumentation()
copyFiles()
buildDocumentation()

18
docs/tools/templates/template.cshtml

@ -1,16 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta charset="utf-8"/>
<title>@Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="@Description">
<meta name="author" content="@Properties["project-author"]">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="description" content="@Description"/>
<meta name="author" content="@Properties["project-author"]"/>
<script src="http://code.jquery.com/jquery-1.8.0.js"></script>
<script src="http://code.jquery.com/ui/1.8.23/jquery-ui.js"></script>
<script src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/js/bootstrap.min.js"></script>
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/css/bootstrap-combined.min.css" rel="stylesheet">
<script src="https://code.jquery.com/jquery-1.8.0.js"></script>
<script src="https://code.jquery.com/ui/1.8.23/jquery-ui.js"></script>
<script src="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/js/bootstrap.min.js"></script>
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/css/bootstrap-combined.min.css" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="@Root/content/style.css" />
<style>
@ -19,7 +19,7 @@
<script type="text/javascript" src="@Root/content/tips.js"></script>
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>

14
paket.lock

@ -3,20 +3,18 @@ NUGET
specs:
BenchShark (1.0.0)
ConsoleDump (0.6.0.1)
FAKE (3.13.0)
FSharp.Compiler.Service (0.0.81)
FAKE (3.17.0)
FSharp.Compiler.Service (0.0.82)
FSharp.Core (3.1.2.1)
FSharp.Formatting (2.5.0)
FSharp.Formatting (2.7.4)
FSharp.Compiler.Service (>= 0.0.82)
FSharpVSPowerTools.Core (>= 1.7.0)
FSharpVSPowerTools.Core (1.7.0)
FSharp.Compiler.Service (>= 0.0.81)
Microsoft.AspNet.Razor (2.0.30506)
RazorEngine (3.3.0)
FsUnit (1.3.0.1)
NUnit (>= 2.6.3)
MathNet.Numerics (3.0.0)
Microsoft.AspNet.Razor (2.0.30506)
NuGet.CommandLine (2.8.3)
NUnit (2.6.4)
NUnit.Runners (2.6.4)
RazorEngine (3.3.0)
Microsoft.AspNet.Razor (>= 2.0.30506.0)
TaskParallelLibrary (1.0.2856)

Loading…
Cancel
Save