Skip to content

Commit

Permalink
Merge pull request #46 from sergey-tihon/master
Browse files Browse the repository at this point in the history
Fixed tips generation - issue #45
  • Loading branch information
dsyme committed Jan 24, 2014
2 parents c970373 + 84a439b commit dd9abac
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 5 deletions.
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

0 comments on commit dd9abac

Please sign in to comment.