Skip to content

Commit 410c75d

Browse files
committed
add init command template files and add them to location abstractions
1 parent 3b00528 commit 410c75d

File tree

6 files changed

+134
-28
lines changed

6 files changed

+134
-28
lines changed

FSharp.Formatting.sln

Lines changed: 34 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 16
4-
VisualStudioVersion = 16.0.29724.152
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.8.34309.116
55
MinimumVisualStudioVersion = 12.0.31101.0
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "project", "project", "{194BD478-0DB5-44F3-A6C2-1FC75D3F3294}"
77
ProjectSection(SolutionItems) = preProject
@@ -22,7 +22,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "project", "project", "{194B
2222
EndProject
2323
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{312E452A-1068-4804-89E7-0AFBAD5F885F}"
2424
ProjectSection(SolutionItems) = preProject
25-
docs\_template.html = docs\_template.html
2625
docs\apidocs.fsx = docs\apidocs.fsx
2726
docs\codeformat.fsx = docs\codeformat.fsx
2827
docs\commandline.md = docs\commandline.md
@@ -35,6 +34,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{312E452A-1
3534
docs\upgrade.md = docs\upgrade.md
3635
docs\users.md = docs\users.md
3736
docs\zero-to-hero.md = docs\zero-to-hero.md
37+
docs\_template.html = docs\_template.html
3838
EndProjectSection
3939
EndProject
4040
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "templates", "templates", "{D0550510-0DCE-4B40-B4FB-091668E1C5FD}"
@@ -48,77 +48,77 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "reference", "reference", "{
4848
misc\templates\reference\type.cshtml = misc\templates\reference\type.cshtml
4949
EndProjectSection
5050
EndProject
51-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Formatting.Markdown", "src\FSharp.Formatting.Markdown\FSharp.Formatting.Markdown.fsproj", "{C44C1C05-599A-40DD-9590-465EAB8960C5}"
51+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Formatting.Markdown", "src\FSharp.Formatting.Markdown\FSharp.Formatting.Markdown.fsproj", "{C44C1C05-599A-40DD-9590-465EAB8960C5}"
5252
EndProject
53-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Formatting.CodeFormat", "src\FSharp.Formatting.CodeFormat\FSharp.Formatting.CodeFormat.fsproj", "{341EBF32-D470-4C55-99E9-55F14F7FFBB1}"
53+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Formatting.CodeFormat", "src\FSharp.Formatting.CodeFormat\FSharp.Formatting.CodeFormat.fsproj", "{341EBF32-D470-4C55-99E9-55F14F7FFBB1}"
5454
EndProject
55-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Formatting.ApiDocs", "src\FSharp.Formatting.ApiDocs\FSharp.Formatting.ApiDocs.fsproj", "{BC4946BA-2724-4524-AC50-DFC49EE154A1}"
55+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Formatting.ApiDocs", "src\FSharp.Formatting.ApiDocs\FSharp.Formatting.ApiDocs.fsproj", "{BC4946BA-2724-4524-AC50-DFC49EE154A1}"
5656
EndProject
57-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Formatting.Literate", "src\FSharp.Formatting.Literate\FSharp.Formatting.Literate.fsproj", "{65E6D541-0486-4383-B619-5CFC5D2BA2F0}"
57+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Formatting.Literate", "src\FSharp.Formatting.Literate\FSharp.Formatting.Literate.fsproj", "{65E6D541-0486-4383-B619-5CFC5D2BA2F0}"
5858
EndProject
5959
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FSharp.Formatting.CSharpFormat", "src\FSharp.Formatting.CSharpFormat\FSharp.Formatting.CSharpFormat.csproj", "{9AB3650B-CC24-4404-A175-A573DA928475}"
6060
EndProject
61-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "fsdocs-tool", "src\fsdocs-tool\fsdocs-tool.fsproj", "{D30F7F2B-A4E3-4A07-A1BD-ED3EB21768F8}"
61+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "fsdocs-tool", "src\fsdocs-tool\fsdocs-tool.fsproj", "{D30F7F2B-A4E3-4A07-A1BD-ED3EB21768F8}"
6262
EndProject
6363
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{8D44B659-E9F7-4CE4-B5DA-D37CDDCD2525}"
6464
ProjectSection(SolutionItems) = preProject
6565
tests\commonmark_spec.json = tests\commonmark_spec.json
6666
EndProjectSection
6767
EndProject
68-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.CodeFormat.Tests", "tests\FSharp.CodeFormat.Tests\FSharp.CodeFormat.Tests.fsproj", "{5DEBD769-D86E-4E14-ABF1-373CA91BFAA2}"
68+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.CodeFormat.Tests", "tests\FSharp.CodeFormat.Tests\FSharp.CodeFormat.Tests.fsproj", "{5DEBD769-D86E-4E14-ABF1-373CA91BFAA2}"
6969
EndProject
70-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Literate.Tests", "tests\FSharp.Literate.Tests\FSharp.Literate.Tests.fsproj", "{C22A18AB-6C54-48B4-AAC5-892499E93D4D}"
70+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Literate.Tests", "tests\FSharp.Literate.Tests\FSharp.Literate.Tests.fsproj", "{C22A18AB-6C54-48B4-AAC5-892499E93D4D}"
7171
EndProject
72-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Markdown.Tests", "tests\FSharp.Markdown.Tests\FSharp.Markdown.Tests.fsproj", "{07DE4905-050C-4378-A039-F1EF7E1F309D}"
72+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Markdown.Tests", "tests\FSharp.Markdown.Tests\FSharp.Markdown.Tests.fsproj", "{07DE4905-050C-4378-A039-F1EF7E1F309D}"
7373
EndProject
74-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.ApiDocs.Tests", "tests\FSharp.ApiDocs.Tests\FSharp.ApiDocs.Tests.fsproj", "{D2EC3D6A-35C0-4445-A9CB-AA18B12B6350}"
74+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.ApiDocs.Tests", "tests\FSharp.ApiDocs.Tests\FSharp.ApiDocs.Tests.fsproj", "{D2EC3D6A-35C0-4445-A9CB-AA18B12B6350}"
7575
EndProject
7676
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestProjects", "TestProjects", "{4AE0198D-EDE5-40B0-A5CD-FC7B6F891D94}"
7777
EndProject
78-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsLib1", "tests\FSharp.ApiDocs.Tests\files\FsLib1\FsLib1.fsproj", "{AD192375-D530-40FB-A4E9-380C74CBB771}"
78+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FsLib1", "tests\FSharp.ApiDocs.Tests\files\FsLib1\FsLib1.fsproj", "{AD192375-D530-40FB-A4E9-380C74CBB771}"
7979
EndProject
80-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsLib2", "tests\FSharp.ApiDocs.Tests\files\FsLib2\FsLib2.fsproj", "{768FD0E0-5CF7-4AF0-98C9-4B848F9AFB62}"
80+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FsLib2", "tests\FSharp.ApiDocs.Tests\files\FsLib2\FsLib2.fsproj", "{768FD0E0-5CF7-4AF0-98C9-4B848F9AFB62}"
8181
EndProject
82-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "TestLib1", "tests\FSharp.ApiDocs.Tests\files\TestLib1\TestLib1.fsproj", "{86326769-3D0B-423F-AD28-A194B34318D6}"
82+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "TestLib1", "tests\FSharp.ApiDocs.Tests\files\TestLib1\TestLib1.fsproj", "{86326769-3D0B-423F-AD28-A194B34318D6}"
8383
EndProject
84-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "TestLib2", "tests\FSharp.ApiDocs.Tests\files\TestLib2\TestLib2.fsproj", "{48EFFECF-ECB0-4DF3-A704-B56AB07557BF}"
84+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "TestLib2", "tests\FSharp.ApiDocs.Tests\files\TestLib2\TestLib2.fsproj", "{48EFFECF-ECB0-4DF3-A704-B56AB07557BF}"
8585
EndProject
86-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "TestLib3", "tests\FSharp.ApiDocs.Tests\files\TestLib3\TestLib3.fsproj", "{52B949AA-A3F7-4894-B713-804BAEB71118}"
86+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "TestLib3", "tests\FSharp.ApiDocs.Tests\files\TestLib3\TestLib3.fsproj", "{52B949AA-A3F7-4894-B713-804BAEB71118}"
8787
EndProject
8888
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "csharpSupport", "tests\FSharp.ApiDocs.Tests\files\csharpSupport\csharpSupport.csproj", "{DA7BA2FA-447E-41F3-88D9-00CF3E052E2C}"
8989
EndProject
90-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "crefLib1", "tests\FSharp.ApiDocs.Tests\files\crefLib1\crefLib1.fsproj", "{A0C8DD00-BD08-48D6-B257-5A838E5DA819}"
90+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "crefLib1", "tests\FSharp.ApiDocs.Tests\files\crefLib1\crefLib1.fsproj", "{A0C8DD00-BD08-48D6-B257-5A838E5DA819}"
9191
EndProject
92-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "crefLib2", "tests\FSharp.ApiDocs.Tests\files\crefLib2\crefLib2.fsproj", "{55728B9D-1EDE-4A40-B439-1EB0B3F77B72}"
92+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "crefLib2", "tests\FSharp.ApiDocs.Tests\files\crefLib2\crefLib2.fsproj", "{55728B9D-1EDE-4A40-B439-1EB0B3F77B72}"
9393
EndProject
9494
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "crefLib3", "tests\FSharp.ApiDocs.Tests\files\crefLib3\crefLib3.csproj", "{08029B28-A5EA-42DB-AB4E-9C6BA9EF9441}"
9595
EndProject
9696
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "crefLib4", "tests\FSharp.ApiDocs.Tests\files\crefLib4\crefLib4.csproj", "{98624699-1B2F-4636-A3F7-EC72343CB2FD}"
9797
EndProject
98-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Formatting.Common", "src\FSharp.Formatting.Common\FSharp.Formatting.Common.fsproj", "{91BAD90E-BF3B-4646-A1A7-1568F8F25075}"
98+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Formatting.Common", "src\FSharp.Formatting.Common\FSharp.Formatting.Common.fsproj", "{91BAD90E-BF3B-4646-A1A7-1568F8F25075}"
9999
EndProject
100-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Formatting.TestHelpers", "tests\FSharp.Formatting.TestHelpers\FSharp.Formatting.TestHelpers.fsproj", "{0B552F94-33FE-4037-9C17-1EB2A885F263}"
100+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Formatting.TestHelpers", "tests\FSharp.Formatting.TestHelpers\FSharp.Formatting.TestHelpers.fsproj", "{0B552F94-33FE-4037-9C17-1EB2A885F263}"
101101
EndProject
102-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "AttributesTestLib", "tests\FSharp.ApiDocs.Tests\files\AttributesTestLib\AttributesTestLib.fsproj", "{B266D118-15AE-4BE6-809E-E9E30CE5C62F}"
102+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "AttributesTestLib", "tests\FSharp.ApiDocs.Tests\files\AttributesTestLib\AttributesTestLib.fsproj", "{B266D118-15AE-4BE6-809E-E9E30CE5C62F}"
103103
EndProject
104104
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{4089E333-3857-4771-B209-5673EF4EEDA3}"
105105
EndProject
106-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Formatting", "src\FSharp.Formatting\FSharp.Formatting.fsproj", "{CB78F0EA-8005-4735-A02C-B86CEDC29D85}"
106+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Formatting", "src\FSharp.Formatting\FSharp.Formatting.fsproj", "{CB78F0EA-8005-4735-A02C-B86CEDC29D85}"
107107
EndProject
108108
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sidebyside", "sidebyside", "{C3E359B5-DB2D-4AA4-A08C-77BAA0E94D21}"
109109
ProjectSection(SolutionItems) = preProject
110-
docs\templates\leftside\_template.html = docs\templates\leftside\_template.html
111110
docs\sidebyside\sideextensions.md = docs\sidebyside\sideextensions.md
112111
docs\sidebyside\sidemarkdown.md = docs\sidebyside\sidemarkdown.md
113112
docs\sidebyside\sidescript.fsx = docs\sidebyside\sidescript.fsx
113+
docs\templates\leftside\_template.html = docs\templates\leftside\_template.html
114114
EndProjectSection
115115
EndProject
116116
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "templates", "templates", "{C7804F57-7FC6-4CF6-BDF6-127D6F9EBEA6}"
117117
EndProject
118118
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "leftside", "leftside", "{188DC91F-2202-4495-ACD2-542D7C30364E}"
119119
ProjectSection(SolutionItems) = preProject
120-
docs\templates\leftside\_template.html = docs\templates\leftside\_template.html
121120
docs\templates\leftside\styling.md = docs\templates\leftside\styling.md
121+
docs\templates\leftside\_template.html = docs\templates\leftside\_template.html
122122
EndProjectSection
123123
EndProject
124124
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "content", "content", "{FAD5C374-4748-4A3D-A435-FFA425916F3A}"
@@ -131,6 +131,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "content", "content", "{FAD5
131131
docs\content\navbar-fixed-right.css = docs\content\navbar-fixed-right.css
132132
EndProjectSection
133133
EndProject
134+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "init", "init", "{A70497A6-C9C3-46D8-A9FB-0E4BB6AD3309}"
135+
ProjectSection(SolutionItems) = preProject
136+
docs\templates\init\.index_md_template.md = docs\templates\init\.index_md_template.md
137+
docs\templates\init\.literate_sample_template.fsx = docs\templates\init\.literate_sample_template.fsx
138+
docs\templates\init\.logo.svg = docs\templates\init\.logo.svg
139+
EndProjectSection
140+
EndProject
134141
Global
135142
GlobalSection(SolutionConfigurationPlatforms) = preSolution
136143
Debug|Any CPU = Debug|Any CPU
@@ -254,6 +261,7 @@ Global
254261
{768FD0E0-5CF7-4AF0-98C9-4B848F9AFB62} = {4AE0198D-EDE5-40B0-A5CD-FC7B6F891D94}
255262
{86326769-3D0B-423F-AD28-A194B34318D6} = {4AE0198D-EDE5-40B0-A5CD-FC7B6F891D94}
256263
{48EFFECF-ECB0-4DF3-A704-B56AB07557BF} = {4AE0198D-EDE5-40B0-A5CD-FC7B6F891D94}
264+
{52B949AA-A3F7-4894-B713-804BAEB71118} = {4AE0198D-EDE5-40B0-A5CD-FC7B6F891D94}
257265
{DA7BA2FA-447E-41F3-88D9-00CF3E052E2C} = {4AE0198D-EDE5-40B0-A5CD-FC7B6F891D94}
258266
{A0C8DD00-BD08-48D6-B257-5A838E5DA819} = {4AE0198D-EDE5-40B0-A5CD-FC7B6F891D94}
259267
{55728B9D-1EDE-4A40-B439-1EB0B3F77B72} = {4AE0198D-EDE5-40B0-A5CD-FC7B6F891D94}
@@ -267,7 +275,7 @@ Global
267275
{C7804F57-7FC6-4CF6-BDF6-127D6F9EBEA6} = {312E452A-1068-4804-89E7-0AFBAD5F885F}
268276
{188DC91F-2202-4495-ACD2-542D7C30364E} = {C7804F57-7FC6-4CF6-BDF6-127D6F9EBEA6}
269277
{FAD5C374-4748-4A3D-A435-FFA425916F3A} = {312E452A-1068-4804-89E7-0AFBAD5F885F}
270-
{52B949AA-A3F7-4894-B713-804BAEB71118} = {4AE0198D-EDE5-40B0-A5CD-FC7B6F891D94}
278+
{A70497A6-C9C3-46D8-A9FB-0E4BB6AD3309} = {C7804F57-7FC6-4CF6-BDF6-127D6F9EBEA6}
271279
EndGlobalSection
272280
GlobalSection(ExtensibilityGlobals) = postSolution
273281
SolutionGuid = {76F121F8-70E0-49FB-9ADF-C7B660C0EB67}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Welcome to your documentation with fsdocs!
2+
3+
For full guides please visit [the FSharp.Formatting](https://fsprojects.github.io/FSharp.Formatting/) documentation pages.
4+
5+
As a quickstart you can start with changing this file with **any** _markdown_ `content` you like.
6+
7+
Assuming you have initialized fsdocs with default settings, you can start the preview server with:
8+
9+
```
10+
fsdocs watch
11+
```
12+
13+
This will start a local server on port 8091, meaning you should be able to see content of this file rendered on [http://localhost:8901/](http://localhost:8901/)
14+
15+
while you can write code blocks in markdown like this:
16+
17+
```fsharp
18+
let a = 42
19+
```
20+
21+
fsdocs supports a more powerful variant of fsharp scripts called [literate scripts](https://fsprojects.github.io/FSharp.Formatting/literate.html).
22+
23+
in literate scripts, you can write markdown and fsharp code in the same file, and fsdocs will render the markdown and execute the fsharp code.
24+
Check the `literate_sample.fsx` file in this folder for an example.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
(**
2+
# Literate script example
3+
4+
- A multi-line comment starting with (** and ending with *) is turned into text and is processed using the F# Markdown processor (which supports standard Markdown commands).
5+
6+
- A single-line comment starting with (*** and ending with ***) is treated as a special command. The command can consist of key, key: value or key=value pairs.
7+
8+
The rest is just plain F# code goodness:
9+
*)
10+
11+
let helloWorld () = printfn "Hello world!"
12+
13+
(**
14+
## Using fsi evaluation
15+
16+
If you run fsdocs with the `--eval` flag, literate scripts will be evaluated by fsi and the output will can be included in the documentation using special commands such as
17+
18+
`(*** include-value ***)` or `(*** include-it ***)` :
19+
20+
*)
21+
22+
// include a value by name via (*** include-value: name ***)
23+
let numbers = [ 0..99 ]
24+
(*** include-value: numbers ***)
25+
26+
// include the fsi output of an expression via (*** include-it ***)
27+
List.sum numbers
28+
(*** include-it ***)
29+
30+
(**
31+
Literate scripts can move your documentation to the next level, because you can make sure that the code in your documentation is always up-to-date and shows results from the latest version.
32+
*)

docs/templates/init/.logo.png

6.49 KB
Loading

src/fsdocs-tool/Options.fs

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,25 +62,49 @@ module Common =
6262

6363
// default folder locations relative to the assembly path
6464
member this.docs = Path.Combine(this.RelAssemblyPath, "docs") |> Path.GetFullPath
65+
member this.docs_templates = Path.Combine(this.docs, "templates") |> Path.GetFullPath
66+
member this.docs_templates_init = Path.Combine(this.docs_templates, "init") |> Path.GetFullPath
67+
member this.docs_img = Path.Combine(this.docs, "img") |> Path.GetFullPath
6568
member this.docs_content = Path.Combine(this.docs, "content") |> Path.GetFullPath
66-
member this.docs_content_image = Path.Combine(this.docs_content, "img") |> Path.GetFullPath
69+
member this.docs_content_img = Path.Combine(this.docs_content, "img") |> Path.GetFullPath
6770

6871
// specific files in this folder structure that might need special treatment instead of just copy pasting
6972
member this.template_html = Path.Combine(this.docs, "_template.html") |> Path.GetFullPath
7073
member this.template_ipynb = Path.Combine(this.docs, "_template.ipynb") |> Path.GetFullPath
7174
member this.template_tex = Path.Combine(this.docs, "_template.tex") |> Path.GetFullPath
75+
member this.dockerfile = Path.Combine(this.docs, "Dockerfile") |> Path.GetFullPath
76+
member this.nuget_config = Path.Combine(this.docs, "Nuget.config") |> Path.GetFullPath
77+
78+
// specific files for the init command
79+
member this.logo_template = Path.Combine(this.docs_templates_init, ".logo.png") |> Path.GetFullPath
80+
81+
member this.index_md_template =
82+
Path.Combine(this.docs_templates_init, ".index_md_template.md")
83+
|> Path.GetFullPath
84+
85+
member this.literate_sample_template =
86+
Path.Combine(this.docs_templates_init, ".literate_sample_template.fsx")
87+
|> Path.GetFullPath
7288

7389
/// <summary>
7490
/// returns true if all special files and folders of this location exist.
7591
/// </summary>
7692
member this.Exist() =
7793
try
7894
Directory.Exists(this.docs)
95+
&& Directory.Exists(this.docs_templates)
96+
&& Directory.Exists(this.docs_templates_init)
97+
&& Directory.Exists(this.docs_img)
7998
&& Directory.Exists(this.docs_content)
80-
&& Directory.Exists(this.docs_content_image)
99+
&& Directory.Exists(this.docs_content_img)
81100
&& File.Exists(this.template_html)
82101
&& File.Exists(this.template_ipynb)
83102
&& File.Exists(this.template_tex)
103+
&& File.Exists(this.dockerfile)
104+
&& File.Exists(this.nuget_config)
105+
&& File.Exists(this.logo_template)
106+
&& File.Exists(this.index_md_template)
107+
&& File.Exists(this.literate_sample_template)
84108
with _ ->
85109
false
86110

@@ -112,6 +136,16 @@ module Common =
112136
member this.template_html = Path.Combine(this.templates, "_template.html") |> Path.GetFullPath
113137
member this.template_ipynb = Path.Combine(this.templates, "_template.ipynb") |> Path.GetFullPath
114138
member this.template_tex = Path.Combine(this.templates, "_template.tex") |> Path.GetFullPath
139+
member this.dockerfile = Path.Combine(this.extras, "Dockerfile") |> Path.GetFullPath
140+
member this.nuget_config = Path.Combine(this.extras, "Nuget.config") |> Path.GetFullPath
141+
142+
// specific files for the init command
143+
member this.logo_template = Path.Combine(this.templates, ".logo.png") |> Path.GetFullPath
144+
member this.index_md_template = Path.Combine(this.templates, ".index_md_template.md") |> Path.GetFullPath
145+
146+
member this.literate_sample_template =
147+
Path.Combine(this.templates, ".literate_sample_template.fsx")
148+
|> Path.GetFullPath
115149

116150
/// <summary>
117151
/// returns true if all special files and folders of this location exist.
@@ -125,5 +159,10 @@ module Common =
125159
&& File.Exists(this.template_html)
126160
&& File.Exists(this.template_ipynb)
127161
&& File.Exists(this.template_tex)
162+
&& File.Exists(this.dockerfile)
163+
&& File.Exists(this.nuget_config)
164+
&& File.Exists(this.logo_template)
165+
&& File.Exists(this.index_md_template)
166+
&& File.Exists(this.literate_sample_template)
128167
with _ ->
129168
false

0 commit comments

Comments
 (0)