diff --git a/.gitignore b/.gitignore index cc7799ad..c7e86d29 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. +paket.local # User-specific files *.suo diff --git a/README.md b/README.md index e3b63a77..db9d5a33 100644 --- a/README.md +++ b/README.md @@ -3,29 +3,47 @@ # FsReveal [![NuGet Status](http://img.shields.io/nuget/v/FsReveal.svg?style=flat)](https://www.nuget.org/packages/FsReveal/) -FsReveal allows you to write beautiful slides in [Markdown](http://daringfireball.net/projects/markdown/syntax) -and brings F# to the [reveal.js][revealjs] web presentation framework. +FsReveal allows you to write beautiful slides in +[Markdown](http://daringfireball.net/projects/markdown/syntax) and brings F# to +the [reveal.js][revealjs] web presentation framework. + +## Quickstart + + git clone --depth=1 https://github.com/fsprojects/FsReveal.git + cd FsReveal + ./build.sh ## Features -- Write your slides in [Markdown](http://daringfireball.net/projects/markdown/syntax) or .fsx files +- Write your slides in + [Markdown](http://daringfireball.net/projects/markdown/syntax) or .fsx files - Automatically updates the browser in edit mode on every save - Syntax highlighting for most programming languages including C#, F# and LaTeX -- Speaker notes; Shows the current slide, next slide, elapsed time and current time +- Speaker notes; Shows the current slide, next slide, elapsed time and current + time - Built in themes - Horizontal and vertical slides - Built in slide transitions using CSS 3D transforms - Slide overview - Works on mobile browsers. Swipe your way through the presentation. -[Examples](http://fsprojects.github.io/FsReveal/index.html#Examples) and a [Getting started guide](http://fsprojects.github.io/FsReveal/getting-started.html) can be found in the docs. +[Examples](http://fsprojects.github.io/FsReveal/index.html#Examples) and a +[Getting started +guide](http://fsprojects.github.io/FsReveal/getting-started.html) can be found +in the docs. [revealjs]: https://github.com/hakimel/reveal.js/ "reveal.js | HTML presentations made easy" +### Hacking on the project + + git checkout develop + # follow README in branch + # git commit ... + # send PR to `develop` if you're improving `FsReveal` or to `master` if you're + # changing the 'default' presentation everyone starts off with. + ### Maintainer(s) - [@kimsk](https://github.com/kimsk) - [@forki](https://github.com/forki) - [@troykershaw](https://github.com/troykershaw) - -The default maintainer account for projects under "fsprojects" is [@fsprojectsgit](https://github.com/fsprojectsgit) - F# Community Project Incubation Space (repo management) diff --git a/build.fsx b/build.fsx index 99b39fcf..f3dd2aba 100644 --- a/build.fsx +++ b/build.fsx @@ -1,4 +1,4 @@ -#I @"packages/FsReveal/fsreveal/" +#I @"packages/FsReveal/tools/" #I @"packages/FAKE/tools/" #I @"packages/Suave/lib/net40" @@ -12,7 +12,7 @@ let gitOwner = "myGitUser" let gitHome = "https://github.com/" + gitOwner // The name of the project on GitHub -let gitProjectName = "MyProject" +let gitProjectName = "FsReveal" // The name of the GitHub repo subdirectory to publish slides to let gitSubDir = "" @@ -39,11 +39,11 @@ Target "Clean" (fun _ -> CleanDirs [outDir] ) -let fsiEvaluator = +let fsiEvaluator = let evaluator = FSharp.Literate.FsiEvaluator() - evaluator.EvaluationFailed.Add(fun err -> + evaluator.EvaluationFailed.Add(fun err -> traceImportant <| sprintf "Evaluating F# snippet failed:\n%s\nThe snippet evaluated:\n%s" err.StdErr err.Text ) - evaluator + evaluator let copyStylesheet() = try @@ -57,15 +57,15 @@ let copyPics() = with | exn -> traceImportant <| sprintf "Could not copy picture: %s" exn.Message -let generateFor (file:FileInfo) = +let generateFor (file:FileInfo) = try copyPics() let rec tryGenerate trials = try FsReveal.GenerateFromFile(file.FullName, outDir, fsiEvaluator = fsiEvaluator) - with + with | exn when trials > 0 -> tryGenerate (trials - 1) - | exn -> + | exn -> traceImportant <| sprintf "Could not generate slides for: %s" file.FullName traceImportant exn.Message @@ -92,8 +92,11 @@ let socketHandler (webSocket : WebSocket) = while true do let! refreshed = Control.Async.AwaitEvent(refreshEvent.Publish) - |> Suave.Sockets.SocketOp.ofAsync - do! webSocket.send Text (ASCII.bytes "refreshed") true + |> Suave.Sockets.SocketOp.ofAsync + let seg = + let bs = ASCII.bytes "refreshed" + ByteSegment bs + do! webSocket.send Text seg true } let startWebServer () = @@ -105,12 +108,12 @@ let startWebServer () = if portIsTaken then findPort (port + 1) else port - let port = findPort 8083 + let port = findPort 8080 - let serverConfig = + let serverConfig = { defaultConfig with homeFolder = Some (FullName outDir) - bindings = [ HttpBinding.mkSimple HTTP "127.0.0.1" port ] + bindings = [ HttpBinding.createSimple HTTP "127.0.0.1" port ] } let app = choose [ @@ -131,7 +134,7 @@ Target "GenerateSlides" (fun _ -> Target "KeepRunning" (fun _ -> use watcher = !! (slidesDir + "/**/*.*") |> WatchChanges handleWatcherEvents - + startWebServer () traceImportant "Waiting for slide edits. Press any key to stop." @@ -162,5 +165,5 @@ Target "ReleaseSlides" (fun _ -> "GenerateSlides" ==> "ReleaseSlides" - + RunTargetOrDefault "KeepRunning" diff --git a/build.sh b/build.sh index cef16ee6..0de2d7da 100755 --- a/build.sh +++ b/build.sh @@ -6,13 +6,13 @@ then .paket/paket.bootstrapper.exe exit_code=$? if [ $exit_code -ne 0 ]; then - exit $exit_code + exit $exit_code fi .paket/paket.exe restore exit_code=$? if [ $exit_code -ne 0 ]; then - exit $exit_code + exit $exit_code fi packages/FAKE/tools/FAKE.exe $@ --fsiargs -d:MONO build.fsx @@ -21,13 +21,13 @@ else mono .paket/paket.bootstrapper.exe exit_code=$? if [ $exit_code -ne 0 ]; then - exit $exit_code + exit $exit_code fi mono .paket/paket.exe restore exit_code=$? if [ $exit_code -ne 0 ]; then - exit $exit_code + exit $exit_code fi mono packages/FAKE/tools/FAKE.exe $@ --fsiargs -d:MONO build.fsx fi diff --git a/paket.dependencies b/paket.dependencies index eb67a0e6..1e72ec0e 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -1,5 +1,6 @@ source https://nuget.org/api/v2 +framework NET461 nuget FsReveal nuget FAKE -nuget Suave \ No newline at end of file +nuget Suave diff --git a/paket.lock b/paket.lock index a39b62d3..76ca4727 100644 --- a/paket.lock +++ b/paket.lock @@ -1,8 +1,10 @@ +FRAMEWORK: NET461 NUGET remote: https://www.nuget.org/api/v2 - FAKE (4.28) + FAKE (4.61.2) FSharp.Compiler.Service (2.0.0.6) - FSharp.Core (4.0.0.1) + FSharp.Core (4.1.17) + System.ValueTuple (>= 4.3) FSharp.Formatting (2.14.4) FSharp.Compiler.Service (2.0.0.6) FSharpVSPowerTools.Core (>= 2.3 < 2.4) @@ -10,5 +12,6 @@ NUGET FSharp.Compiler.Service (>= 2.0.0.3) FsReveal (1.3.1) FSharp.Formatting (>= 2.11) - Suave (1.1.2) - FSharp.Core (>= 3.1.2.5) + Suave (2.1) + FSharp.Core (>= 4.0.0.1) + System.ValueTuple (4.3.1) diff --git a/slides/index.md b/slides/index.md index d14877d2..92088cd3 100644 --- a/slides/index.md +++ b/slides/index.md @@ -117,11 +117,11 @@ [lang=paket] source https://nuget.org/api/v2 - nuget Castle.Windsor-log4net >= 3.2 - nuget NUnit - - github forki/FsUnit FsUnit.fs - + nuget Suave ~> 2 + nuget Expecto + + github logary/logary src/Logary.Facade/Facade.fs + --- ### C/AL