Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinmoris committed Feb 9, 2018
2 parents d1edd92 + c82c45c commit 6859512
Show file tree
Hide file tree
Showing 15 changed files with 1,944 additions and 1,933 deletions.
4 changes: 4 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Release Notes
=============

## 0.15.0

Updated all templates to use the latest `Giraffe 1.0.0` release.

## 0.14.0

#### New features
Expand Down
973 changes: 487 additions & 486 deletions src/content/DotLiquid/paket.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="2.0.*" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="2.0.*" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.0.*" />
<PackageReference Include="Giraffe" Version="0.1.0-beta-600" />
<PackageReference Include="Giraffe.DotLiquid" Version="0.1.0-beta-310" />
<PackageReference Include="Giraffe" Version="1.0.*" />
<PackageReference Include="Giraffe.DotLiquid" Version="1.0.*" />
</ItemGroup>

<ItemGroup Condition="'$(UsePaket)' == false OR '$(UsePaket)' == ''">
Expand Down
3 changes: 2 additions & 1 deletion src/content/DotLiquid/src/AppNamePlaceholder/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ let configureApp (app : IApplicationBuilder) =
.UseGiraffe(webApp)

let configureServices (services : IServiceCollection) =
services.AddCors() |> ignore
services.AddCors() |> ignore
services.AddGiraffe() |> ignore

let configureLogging (builder : ILoggingBuilder) =
let filter (l : LogLevel) = l.Equals LogLevel.Error
Expand Down
1,575 changes: 788 additions & 787 deletions src/content/Giraffe/paket.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="2.0.*" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="2.0.*" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.0.*" />
<PackageReference Include="Giraffe" Version="0.1.0-beta-700" />
<PackageReference Include="Giraffe" Version="1.0.*" />
</ItemGroup>

<ItemGroup>
Expand Down
43 changes: 23 additions & 20 deletions src/content/Giraffe/src/AppNamePlaceholder/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ open Microsoft.AspNetCore.Hosting
open Microsoft.Extensions.Logging
open Microsoft.Extensions.DependencyInjection
open Giraffe
open GiraffeViewEngine

// ---------------------------------
// Models
Expand All @@ -23,25 +22,28 @@ type Message =
// Views
// ---------------------------------

let layout (content: XmlNode list) =
html [] [
head [] [
title [] [ encodedText "AppNamePlaceholder" ]
link [ _rel "stylesheet"
_type "text/css"
_href "/main.css" ]
module Views =
open GiraffeViewEngine

let layout (content: XmlNode list) =
html [] [
head [] [
title [] [ encodedText "AppNamePlaceholder" ]
link [ _rel "stylesheet"
_type "text/css"
_href "/main.css" ]
]
body [] content
]
body [] content
]

let partial () =
h1 [] [ encodedText "AppNamePlaceholder" ]
let partial () =
h1 [] [ encodedText "AppNamePlaceholder" ]

let indexView (model : Message) =
[
partial()
p [] [ encodedText model.Text ]
] |> layout
let index (model : Message) =
[
partial()
p [] [ encodedText model.Text ]
] |> layout

// ---------------------------------
// Web app
Expand All @@ -50,8 +52,8 @@ let indexView (model : Message) =
let indexHandler (name : string) =
let greetings = sprintf "Hello %s, from Giraffe!" name
let model = { Text = greetings }
let view = indexView model
renderHtml view
let view = Views.index model
htmlView view

let webApp =
choose [
Expand Down Expand Up @@ -90,7 +92,8 @@ let configureApp (app : IApplicationBuilder) =
.UseGiraffe(webApp)

let configureServices (services : IServiceCollection) =
services.AddCors() |> ignore
services.AddCors() |> ignore
services.AddGiraffe() |> ignore

let configureLogging (builder : ILoggingBuilder) =
let filter (l : LogLevel) = l.Equals LogLevel.Error
Expand Down
149 changes: 75 additions & 74 deletions src/content/None/paket.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="2.0.*" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="2.0.*" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.0.*" />
<PackageReference Include="Giraffe" Version="0.1.0-beta-700" />
<PackageReference Include="Giraffe" Version="1.0.*" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions src/content/None/src/AppNamePlaceholder/HttpHandlers.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ module HttpHandlers =

open Microsoft.AspNetCore.Http
open Giraffe
open Giraffe.HttpHandlers
open AppNamePlaceholder.Models

let handleGetHello =
fun (next : HttpFunc) (ctx : HttpContext) ->
task {
Expand Down
5 changes: 2 additions & 3 deletions src/content/None/src/AppNamePlaceholder/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ let configureApp (app : IApplicationBuilder) =
.UseGiraffe(webApp)

let configureServices (services : IServiceCollection) =
let sp = services.BuildServiceProvider()
let env = sp.GetService<IHostingEnvironment>()
services.AddCors() |> ignore
services.AddCors() |> ignore
services.AddGiraffe() |> ignore

let configureLogging (builder : ILoggingBuilder) =
let filter (l : LogLevel) = l.Equals LogLevel.Error
Expand Down
Loading

0 comments on commit 6859512

Please sign in to comment.