Skip to content

Commit 81d162c

Browse files
authored
update FCS doc generation (#3694)
1 parent d39cba7 commit 81d162c

File tree

4 files changed

+12
-16
lines changed

4 files changed

+12
-16
lines changed

fcs/build.fsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,11 @@ Target "Nuget.AddNetStd" (fun _ ->
144144
// Generate the documentation
145145

146146
Target "GenerateDocsEn" (fun _ ->
147-
executeFSIWithArgs "docsrc/tools" "generate.fsx" ["--define:RELEASE"] [] |> ignore
147+
executeFSIWithArgs "docsrc/tools" "generate.fsx" [] [] |> ignore
148148
)
149149

150150
Target "GenerateDocsJa" (fun _ ->
151-
executeFSIWithArgs "docsrc/tools" "generate.ja.fsx" ["--define:RELEASE"] [] |> ignore
151+
executeFSIWithArgs "docsrc/tools" "generate.ja.fsx" [] [] |> ignore
152152
)
153153

154154
// --------------------------------------------------------------------------------------

fcs/docsrc/tools/generate.fsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ let docTemplate = formatting @@ "templates/docpage.cshtml"
4242

4343
// Where to look for *.csproj templates (in this order)
4444
let layoutRoots =
45-
[ templates; formatting @@ "templates"
45+
[ templates;
46+
formatting @@ "templates"
4647
formatting @@ "templates/reference" ]
4748

4849
// Copy static files and CSS + JS from F# Formatting
@@ -84,12 +85,11 @@ let buildReference () =
8485

8586
// Build documentation from `fsx` and `md` files in `docsrc/content`
8687
let buildDocumentation () =
87-
let subdirs = Directory.EnumerateDirectories(content, "*", SearchOption.AllDirectories)
88-
for dir in Seq.append [content] subdirs do
88+
for dir in [content] do
8989
let sub = if dir.Length > content.Length then dir.Substring(content.Length + 1) else "."
9090
Literate.ProcessDirectory
9191
( dir, docTemplate, output @@ sub, replacements = ("root", root)::info,
92-
layoutRoots = layoutRoots, generateAnchors = true )
92+
layoutRoots = layoutRoots, generateAnchors = true, processRecursive=false )
9393

9494
// Generate
9595
copyFiles()

fcs/docsrc/tools/generate.ja.fsx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ open FSharp.MetadataFormat
3838

3939
// When called from 'build.fsx', use the public project URL as <root>
4040
// otherwise, use the current 'output' directory.
41-
#if RELEASE
42-
let root = website
43-
#else
44-
let root = "file://" + (__SOURCE_DIRECTORY__ @@ "../output/ja")
45-
#endif
41+
let root = "."
4642

4743
// Paths with template/source/output locations
4844
let bin = __SOURCE_DIRECTORY__ @@ "../../../Release/fcs/net45"
@@ -56,15 +52,15 @@ let docTemplate = formatting @@ "templates/docpage.cshtml"
5652
// Where to look for *.csproj templates (in this order)
5753
let layoutRoots =
5854
[ templates
59-
formatting @@ "templates"]
55+
formatting @@ "templates"
56+
formatting @@ "templates/reference"]
6057

6158
// Copy static files and CSS + JS from F# Formatting
6259
// Build documentation from `fsx` and `md` files in `docsrc/content`
6360
let buildDocumentation () =
64-
let subdirs = Directory.EnumerateDirectories(content, "*", SearchOption.AllDirectories)
65-
|> Seq.filter (fun x -> x.Contains "ja")
66-
for dir in Seq.append [content] subdirs do
61+
for dir in [content] do
6762
let sub = if dir.Length > content.Length then dir.Substring(content.Length + 1) else "."
63+
printfn "root = %s" root
6864
Literate.ProcessDirectory
6965
( dir, docTemplate, outputJa @@ sub, replacements = ("root", root)::info,
7066
layoutRoots = layoutRoots, generateAnchors = true )

fcs/paket.dependencies

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
frameworks: net45
1+
framework: net45
22

33
source https://www.nuget.org/api/v2/
44

0 commit comments

Comments
 (0)