Skip to content

Commit

Permalink
Updated docs and hopefully fixed dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
RussBaz committed Nov 9, 2021
1 parent aca0d57 commit 4168126
Show file tree
Hide file tree
Showing 19 changed files with 100 additions and 1,108 deletions.
24 changes: 15 additions & 9 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ jobs:
run: dotnet tool restore
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build
- name: Build Core
run: dotnet build ./src/WebFrame
- name: Build Tests
run: dotnet build ./tests/WebFrame.Tests
- name: Test with the dotnet CLI
run: dotnet test -v m
run: dotnet test -v m ./tests/WebFrame.Tests
build_windows:

runs-on: windows-latest
Expand All @@ -41,10 +43,12 @@ jobs:
run: dotnet tool restore
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build
- name: Build Core
run: dotnet build ./src/WebFrame
- name: Build Tests
run: dotnet build ./tests/WebFrame.Tests
- name: Test with the dotnet CLI
run: dotnet test -v m
run: dotnet test -v m ./tests/WebFrame.Tests

build_macos:

Expand All @@ -63,7 +67,9 @@ jobs:
run: dotnet tool restore
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build
- name: Build Core
run: dotnet build ./src/WebFrame
- name: Build Tests
run: dotnet build ./tests/WebFrame.Tests
- name: Test with the dotnet CLI
run: dotnet test -v m
run: dotnet test -v m ./tests/WebFrame.Tests
12 changes: 5 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,12 @@ jobs:
run: dotnet tool restore
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build
- name: Build Core
run: dotnet build ./src/WebFrame
- name: Build Tests
run: dotnet build ./tests/WebFrame.Tests
- name: Test with the dotnet CLI
run: dotnet test
run: dotnet test -v m ./tests/WebFrame.Tests
- run: dotnet build --configuration Release ./src/WebFrame/WebFrame.fsproj
- name: Create the package
run: dotnet paket pack --template ./src/WebFrame/paket.template --specific-version RussBaz.WebFrame ${{ needs.check_tag.outputs.release_version }} --build-config Release .
Expand Down Expand Up @@ -85,10 +87,6 @@ jobs:
run: dotnet tool restore
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build
- name: Test with the dotnet CLI
run: dotnet test
- run: dotnet build --configuration Release ./templates/templatepack.fsproj
- name: Create the package
run: dotnet pack ./templates/templatepack.fsproj -c Release -p:PackageVersion=${{ needs.check_tag.outputs.release_version }} -o .
Expand Down
28 changes: 8 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# WebFrame
[![Build Status](https://img.shields.io/github/workflow/status/RussBaz/WebFrame/.NET%20Core)](https://github.com/russbaz/webframe/actions/workflows/github-actions.yml)
[![Latest Published Nuget Version](https://img.shields.io/nuget/v/RussBaz.WebFrame)](https://www.nuget.org/packages/RussBaz.WebFrame/)
[![Latest Published Nuget Version](https://img.shields.io/nuget/v/RussBaz.WebFrame.Templates?label=templates)](https://www.nuget.org/packages/RussBaz.WebFrame.Templates/)
[![Latest Published Templates Version](https://img.shields.io/nuget/v/RussBaz.WebFrame.Templates?label=templates)](https://www.nuget.org/packages/RussBaz.WebFrame.Templates/)

A massive helper F# framework for making rapid prototyping with ASP.NET Core pleasant.
F# framework for rapid prototyping with ASP.NET Core.

### Fast Travel
* [Introduction - A Story Time](#introduction---a-story-time)
Expand Down Expand Up @@ -57,7 +57,7 @@ Yes, you can just write it and experience the full ASP.NET Core server!

There are a lot of helper methods available and mostly all of them are attached to the only (RequestServices) parameter that is passed to the handler on each request. This setup uses the endpoints api and all the routes can be inspected at any time.

This project is still work in progress and it is far from being a final product. Therefore - all contributions are absolutely welcome.
This project is still a work in progress and it is far from being a final product. Therefore - all contributions are absolutely welcome.

## Guiding Principles
Here are the guiding principals for the development and vision of the project:
Expand All @@ -78,10 +78,10 @@ For those who just start with F#, I recommend starting with the following websit

Once you familiarise yourself with the syntax and deal with the .Net runtime, you should check the `Samples` folder.

Clone this repository and then install the minimal template:
Install the minimal template:

```
dotnet new -i ./path/to/templates/Minimal/
dotnet new -i RussBaz.WebFrame.Templates::*
```

Create a new project just like you would normally do in a new directory of your choice:
Expand All @@ -90,18 +90,6 @@ Create a new project just like you would normally do in a new directory of your
dotnet new webframe
```

Before you can continue, you need to adjust a path to the cloned WebFrame project.

Please find your new project file called `YourProjectName.fsproj` and adjust the `Include` property in the following line (for the newcomers - it is internally an xml file) to point to currently cloned `WebFrame.fsproj` project file:

```xml
<ItemGroup>
<ProjectReference Include="..\..\WebFrame\src\WebFrame.fsproj" />
</ItemGroup>
```

This manual adjusting step is currently required because I have not published this project to any package repository and this template is too simple to do it automagically.

Once this is done, run the following command (in the same folder where your .fsproj file is) to start the server:

`dotnet run`
Expand All @@ -120,9 +108,9 @@ If it is a console project, add Web framework reference.

If it is a Web project, delete the Setup file and clean up the Program file.

Add WebFrame project reference and open it in the main file. It will immediately import all the required stuff for the minimal setup.
Add WebFrame package reference and open it in the main file. It will immediately import all the required stuff for the minimal setup.

Please consider using [Paket](https://fsprojects.github.io/Paket/) if you do not mind (as it can reference GitHub projects directly)
Please consider using [Paket](https://fsprojects.github.io/Paket/) if you do not mind (it can reference GitHub projects directly)

Update the dependencies if required.

Expand All @@ -136,7 +124,7 @@ Please check the Samples folder for examples of most of available apis.
* AdvancedServer - a kitchen sink of most other available apis and helpers from the simplest to the most complicated

### Sample Code
The following snippet shows some common scenarios and it is taken directly out of StandardServer project in the Samples folder. Please check it out.
The following snippet shows some common scenarios.
```F#
open WebFrame
open type WebFrame.Endpoints.Helpers
Expand Down
7 changes: 7 additions & 0 deletions WebFrame.sln
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "WebFrame.Tests", "tests\Web
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "templatepack", "templates\templatepack.fsproj", "{D93A115F-325B-4433-9EFC-1849311C5574}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{7FC46BB0-9E13-4C1D-8540-AB6DF62285E0}"
ProjectSection(SolutionItems) = preProject
.github\workflows\github-actions.yml = .github\workflows\github-actions.yml
.github\workflows\release.yml = .github\workflows\release.yml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -163,5 +169,6 @@ Global
{B5D8BCB2-8231-44BD-846C-F53DEBE88DBC} = {10075972-9166-4D47-87B1-47DC4567CE57}
{8457CA84-6CFA-4CDD-8A7D-254E24150956} = {829596DB-A8F4-4DF8-89C8-A372C9B7E88D}
{75131042-ADF7-4065-804A-194095945DCA} = {F49A36A9-1D60-4CB3-BCE0-7FE4B998DA65}
{7FC46BB0-9E13-4C1D-8540-AB6DF62285E0} = {829596DB-A8F4-4DF8-89C8-A372C9B7E88D}
EndGlobalSection
EndGlobal
17 changes: 8 additions & 9 deletions paket.dependencies
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
source https://api.nuget.org/v3/index.json

storage: none
framework: net5.0, netstandard2.0, netstandard2.1
framework: net5.0

nuget FSharp.Core ~> 6
nuget FSharp.Core ~> 6.0.1

nuget Newtonsoft.Json ~> 13
nuget Newtonsoft.Json ~> 13.0.1

nuget Microsoft.AspNetCore.TestHost ~> 5
nuget Microsoft.AspNetCore.App
nuget Microsoft.AspNetCore.TestHost ~> 5.0.12

nuget FsUnit ~> 4
nuget NUnit ~> 3
nuget NUnit3TestAdapter ~> 4
nuget FsUnit ~> 4.0.7
nuget NUnit ~> 3.13.2
nuget NUnit3TestAdapter ~> 4.1

nuget Microsoft.NET.Test.Sdk
nuget Microsoft.NET.Test.Sdk ~> 17.0
Loading

0 comments on commit 4168126

Please sign in to comment.