Skip to content

Commit da22a35

Browse files
authored
Merge pull request #2 from CompositionalIT/update-net8
Update to net8 and standardise repo
2 parents db92121 + 6c39ff7 commit da22a35

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+3507
-10331
lines changed

.config/dotnet-tools.json

+2-8
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,16 @@
33
"isRoot": true,
44
"tools": {
55
"paket": {
6-
"version": "6.0.0-beta8",
6+
"version": "8.0.3",
77
"commands": [
88
"paket"
99
]
1010
},
1111
"fable": {
12-
"version": "3.1.12",
12+
"version": "4.12.2",
1313
"commands": [
1414
"fable"
1515
]
16-
},
17-
"fantomas-tool": {
18-
"version": "4.4.0",
19-
"commands": [
20-
"fantomas"
21-
]
2216
}
2317
}
2418
}

.github/workflows/build.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
7+
jobs:
8+
build:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Check out
14+
uses: actions/checkout@v4
15+
16+
- name: Restore tools
17+
run: dotnet tool restore
18+
19+
- name: Build
20+
run: dotnet build --configuration Release
21+
22+
- name: Restore demo tools
23+
run: dotnet tool restore
24+
working-directory: ./demo
25+
26+
- name: Build Demo
27+
run: npm run build
28+
working-directory: ./demo

.github/workflows/publish.yml

+46-25
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,53 @@
1-
name: Nuget-Publish
1+
name: Release Package
22

33
on:
4-
push:
5-
branches: [ main ]
6-
pull_request:
7-
branches: [ main ]
4+
release:
5+
types: [published]
86

97
jobs:
10-
build:
11-
8+
publish:
129
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
1312

1413
steps:
15-
- uses: actions/checkout@v2
16-
- name: Setup .NET
17-
uses: actions/setup-dotnet@v1
18-
with:
19-
dotnet-version: 5.0.100
20-
- name: Restore tools
21-
run: dotnet tool restore
22-
- name: Restore dependencies
23-
run: dotnet restore
24-
working-directory: ./fable/Feliz.ReactAwesomeSlider
25-
- name: Build
26-
run: dotnet build --configuration Release --no-restore
27-
working-directory: ./fable/Feliz.ReactAwesomeSlider
28-
- name: Publish
29-
uses: brandedoutcast/[email protected]
30-
with:
31-
PROJECT_FILE_PATH: fable/Feliz.ReactAwesomeSlider/Feliz.ReactAwesomeSlider.fsproj
32-
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
14+
- name: Check out
15+
uses: actions/checkout@v4
16+
17+
- name: Setup .NET
18+
uses: actions/setup-dotnet@v4
19+
with:
20+
dotnet-version: 8.0.x
21+
22+
- name: Restore tools
23+
run: dotnet tool restore
24+
25+
# Build and Pack need to be separate operations due to error NU5026
26+
- name: Build
27+
run: dotnet build --configuration Release
28+
29+
- name: Pack
30+
run: dotnet pack --no-build -p:PackageVersion=${{ github.ref_name }} -p:PackageReleaseNotes=${{ github.event.release.html_url }} --output .
31+
working-directory: ./src/Feliz.ReactAwesomeSlider
32+
33+
- name: Publish
34+
run: dotnet nuget push "*.nupkg" --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
35+
working-directory: ./src/Feliz.ReactAwesomeSlider
36+
37+
- name: Setup node
38+
uses: actions/setup-node@v4
39+
with:
40+
node-version: 20
41+
42+
- name: Restore demo tools
43+
run: dotnet tool restore
44+
working-directory: ./demo
45+
46+
- name: Build Demo
47+
run: npm run build
48+
working-directory: ./demo
49+
50+
- name: Deploy pages 🚀
51+
uses: JamesIves/github-pages-deploy-action@v4
52+
with:
53+
folder: ./demo/dist

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ bin/
1111
packages/
1212
paket-files/
1313
node_modules/
14+
output/
1415
release.cmd
1516
release.sh
1617
*.orig

.paket/Paket.Restore.targets

+560-494
Large diffs are not rendered by default.

Build.fs

-79
This file was deleted.

Build.fsproj

-12
This file was deleted.

Helpers.fs

-104
This file was deleted.

src/Client/App.fs renamed to demo/App.fs

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,20 @@ module 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 "./styles/global.scss"
13+
1114
Program.mkProgram Index.init Index.update Index.view
1215
#if DEBUG
1316
|> Program.withConsoleTrace
1417
#endif
15-
|> Program.withReactSynchronous "elmish-app"
18+
|> Program.withReactSynchronous "feliz-app"
1619
#if DEBUG
1720
|> Program.withDebugger
1821
#endif

demo/Demo.fsproj

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project Sdk="Microsoft.NET.Sdk">
3+
<PropertyGroup>
4+
<TargetFramework>net8.0</TargetFramework>
5+
<DefineConstants>FABLE_COMPILER</DefineConstants>
6+
</PropertyGroup>
7+
<ItemGroup>
8+
<None Include="index.html" />
9+
<None Include="paket.references" />
10+
<Compile Include="Index.fs" />
11+
<Compile Include="App.fs" />
12+
<Content Include="vite.config.mts" />
13+
<Content Include="package.json" />
14+
<Content Include="styles\global.scss" />
15+
</ItemGroup>
16+
<ItemGroup>
17+
<ProjectReference Include="..\src\Feliz.ReactAwesomeSlider\Feliz.ReactAwesomeSlider.fsproj" />
18+
</ItemGroup>
19+
<Import Project="..\.paket\Paket.Restore.targets" />
20+
</Project>

0 commit comments

Comments
 (0)