Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed tips generation - issue #45 #46

Merged
4 commits merged into from
Jan 24, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions docs/content/index.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ Documentation
<div class="span1"></div>
</div>

<img src="img/logo.png" alt="F# Project" style="float:right;width:150px;margin:10px" />

Example
-------

Expand Down
30 changes: 27 additions & 3 deletions docs/tools/generate.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,31 @@ let buildDocumentation () =
( dir, docTemplate, output @@ sub, replacements = ("root", root)::info,
layoutRoots = layoutRoots )

// Remove `FSharp.Core` from `bin` directory.
// Otherwise, version conflict can break code tips.
let execute pipeline =
// Cache `FSharp.Core.*` files
let files =
!! (bin @@ "FSharp.Core.*")
|> Seq.toArray
|> Array.map (fun file ->
(file, File.ReadAllBytes file))
if (files.Length > 0) then
TraceHelper.traceError "Consider setting CopyLocal to False for FSharp.Core in all *.fsproj files"
// Remove `FSharp.Core.*` files
files |> Seq.iter (fun (file,_) ->
TraceHelper.traceImportant <| sprintf "Removing '%s'" file
File.Delete file)
// Execute document generation pipeline
pipeline()
// Restore `FSharp.Core.*` files
files |> Seq.iter (fun (file, bytes) ->
TraceHelper.traceImportant <| sprintf "Restoring '%s'" file
File.WriteAllBytes(file, bytes))


// Generate
copyFiles()
buildDocumentation()
buildReference()
execute(
copyFiles
>> buildDocumentation
>> buildReference)
1 change: 1 addition & 0 deletions docs/tools/templates/template.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
@RenderBody()
</div>
<div class="span3">
<img src="img/logo.png" alt="F# Project" style="float:left;width:150px;margin:10px" />
<ul class="nav nav-list" id="menu">
<li class="nav-header">@Properties["project-name"]</li>
<li><a href="@Root/index.html">Home page</a></li>
Expand Down