Skip to content

Commit 6b56d27

Browse files
author
Tim Forkmann
committed
Refactor documentation structure and update dependencies
1 parent 50f534a commit 6b56d27

File tree

14 files changed

+1773
-4537
lines changed

14 files changed

+1773
-4537
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"rollForward": false
1111
},
1212
"fable": {
13-
"version": "5.0.0-alpha.5",
13+
"version": "4.24.0",
1414
"commands": [
1515
"fable"
1616
],

Build.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,10 @@ Target.create "InstallDocs" (fun _ ->
196196
run npm "install --frozen-lockfile" "."
197197
run dotnet "restore" docsSrcPath )
198198

199-
Target.create "PublishDocs" (fun _ -> run npm "run build::docs" ".")
199+
Target.create "PublishDocs" (fun _ -> run npm "run build::docs" "")
200200

201201
Target.create "RunDocs" (fun _ ->
202-
run npm "run startdocs" ".")
202+
run npm "run start::docs" "")
203203

204204
let dependencies = [
205205

package-lock.json

Lines changed: 1688 additions & 4302 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"scripts": {
44
"start::client": "dotnet fable watch ./src/Client --outDir ./src/Client/output --run vite serve",
55
"build::client": "dotnet fable ./src/Client --outDir ./src/Client/output --run vite build",
6-
"start::docs": "dotnet fable watch ./src/Docs --outDir ./src/Docs/output --run vite serve",
7-
"build::docs": "dotnet fable ./src/Docs --outDir ./src/Docs/output --run vite build"
6+
"start::docs": "dotnet fable watch ./src/Docs --outDir ./src/Docs/output --run vite serve --config ./viteDocs.config.mts",
7+
"build::docs": "dotnet fable ./src/Docs --outDir ./src/Docs/output --run vite build --config ./viteDocs.config.mts"
88
},
99

1010
"cross-os": {
@@ -15,34 +15,22 @@
1515
}
1616
},
1717
"devDependencies": {
18-
"@babel/core": "^7.6.4",
19-
"@babel/plugin-transform-runtime": "^7.6.2",
20-
"@babel/preset-env": "^7.9.6",
21-
"@babel/runtime": "^7.6.3",
2218
"@fortawesome/fontawesome-free": "^5.15.1",
2319
"vite": "^6.0.11",
24-
"buffer": "^6.0.3",
2520
"@vitejs/plugin-react" : "^4.3.4",
2621
"core-js": "^3.3.2",
2722
"http-proxy-middleware": "^3.0.3",
2823
"i18next": "^20.3.5",
2924
"open-sans-fonts": "^1.6.2",
30-
"react": "^18.2.0",
25+
"react": "^19.1.0",
3126
"remotedev": "^0.2.0",
32-
"react-dom": "^18.2.0",
33-
"@tailwindcss/vite" : "^4.0.3",
27+
"react-dom": "^19.1.0",
28+
"@tailwindcss/vite" : "^4.0.17",
3429
"@tailwindcss/typography" : "^0.5.16",
35-
"tailwindcss": "^4.0.3",
36-
"cssnano": "^7.0.6",
37-
"autoprefixer": "^10.4.2",
30+
"tailwindcss": "^4.0.17",
3831
"react-highlight": "0.15.0",
39-
"sass": "^1.69.5",
4032
"selfsigned": "^2.0.1",
4133
"highlight.js" : "^11.11.1",
42-
"serve-static": "^1.10.2",
43-
"react-slick": "^0.30.3",
44-
"slick-carousel": "1.8.1",
45-
"style-loader": "^1.2.1",
4634
"daisyui": "5.0.9"
4735
},
4836
"dependencies": {
@@ -52,7 +40,7 @@
5240
"daisyui": "^5.0.9",
5341
"hammerjs": "^2.0.8",
5442
"react-chartjs-2": "5.3.0",
55-
"tailwindcss": "^4.0.3",
43+
"tailwindcss": "^4.0.17",
5644
"chartjs-adapter-moment" : "1.0.1"
5745
}
5846
}

src/Docs/App.fs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,21 @@ module Docs.App
22

33
open Elmish
44
open Elmish.React
5+
open Fable.Core.JsInterop
56

67
#if DEBUG
78
open Elmish.Debug
89
open Elmish.HMR
910
#endif
1011

12+
importSideEffects "./index.css"
13+
1114
Program.mkProgram View.init View.update View.AppView
1215
#if DEBUG
1316
|> Program.withConsoleTrace
1417
#endif
15-
|> Program.withReactSynchronous "safer-app"
18+
|> Program.withReactSynchronous "elmish-app"
1619
#if DEBUG
1720
|> Program.withDebugger
1821
#endif
19-
|> Program.run
22+
|> Program.run

src/Docs/View.fs

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,14 @@ type State = { Page: Page; Theme: string }
1515

1616
let init () =
1717
let nextPage = Router.currentUrl () |> Page.parseFromUrlSegments
18-
{ Page = nextPage; Theme = "light" }, Cmd.navigatePage nextPage
18+
{ Page = nextPage; Theme = "corporate" }, Cmd.navigatePage nextPage
1919

2020
let update (msg: Msg) (state: State) : State * Cmd<Msg> =
2121
match msg with
2222
| UrlChanged page -> { state with Page = page }, Cmd.none
2323
| SetTheme theme -> { state with Theme = theme }, Cmd.none
2424

2525
let private rightSide state dispatch (title: string) (docLink: string) elm =
26-
27-
2826
Daisy.drawerContent [
2927
Daisy.navbar [
3028
Daisy.navbarStart [
@@ -57,30 +55,10 @@ let private rightSide state dispatch (title: string) (docLink: string) elm =
5755
++ prop.className "my-6 text-5xl font-bold"
5856
prop.text title
5957
]
60-
6158
elm ]
6259
]
6360

6461
let private leftSide (p: Page) =
65-
let miBadge (b: string) (t: string) (mp: Page) =
66-
Html.li [
67-
Html.a [
68-
prop.href mp
69-
prop.onClick Router.goToUrl
70-
if p = mp then
71-
menuItem.active
72-
++ prop.className "justify-between"
73-
else
74-
prop.className "justify-between"
75-
prop.children [
76-
Html.span t
77-
Html.span [
78-
prop.className "badge"
79-
prop.text b
80-
]
81-
]
82-
]
83-
]
8462

8563
let mi (t: string) (mp: Page) =
8664
Html.li [
@@ -124,6 +102,7 @@ let private leftSide (p: Page) =
124102
mi "BarChart" BarChart
125103
mi "DoughnutChart" DoughnutChart
126104
mi "MixedChart" MixedChart
105+
mi "BubbleChart" BubbleChart
127106
]
128107
]
129108
]
@@ -149,7 +128,6 @@ let private inLayout state dispatch (title: string) (docLink: string) (p: Page)
149128
]
150129

151130

152-
153131
[<ReactComponent>]
154132
let AppView (state: State) (dispatch: Msg -> unit) =
155133

src/Docs/index.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
@import "tailwindcss";
2+
@import "@fortawesome/fontawesome-free/css/all.min.css";
3+
4+
html, body {
5+
height: 100%;
6+
scroll-behavior: smooth;
7+
}
8+
9+
#elmish-app {
10+
display: flex;
11+
flex-flow: column;
12+
height: 100%
13+
}
14+
15+
@plugin 'daisyui' {
16+
themes: all;
17+
}

src/Docs/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
<title>Feliz.ChartJS</title>
66
<meta charset="utf-8">
77
<meta name="viewport" content="width=device-width, initial-scale=1">
8-
<script src="./output/App.js" type="module"></script>
98
</head>
109

1110
<body>
12-
<div id="safer-app"></div>
11+
<div id="elmish-app"></div>
12+
<script src="./output/App.js" type="module"></script>
1313
</body>
1414

15-
</html>
15+
</html>

src/Docs/public/unusefulimage.png

-85.6 KB
Binary file not shown.

src/Docs/styles/additional_styles.css

Lines changed: 0 additions & 164 deletions
This file was deleted.

0 commit comments

Comments
 (0)