Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
37471e9
[infra] make build.sh executable
haf Nov 9, 2016
b1579ba
Adding bundled/minimized/offline package version
haf Nov 9, 2016
702b089
Documenting building
haf Nov 9, 2016
99e7424
Cleanups and correcting css/custom.css path
haf Nov 9, 2016
1ee192b
Document where the fsx files are
haf Nov 9, 2016
1e5bc10
[infra] OS X -> Linux on travis
haf Nov 9, 2016
36c6561
Remove stray package.json
haf Nov 9, 2016
39ebf2e
Removing stray yarn.lock
haf Nov 9, 2016
8c4cfbd
[infra] paket update
haf Nov 9, 2016
d8c965a
More docs, fixing path
haf Nov 9, 2016
78aa58a
changing nuget
haf Nov 9, 2016
4979cb0
Bring the tool
haf Nov 9, 2016
3009c06
Move it all into tools instead
haf Nov 9, 2016
4d8fe91
Compile js
haf Nov 9, 2016
631c414
location of template
haf Nov 9, 2016
d91b4ea
Dist folder update
haf Nov 9, 2016
eee8dee
Adding css-loader
haf Nov 9, 2016
4f9620b
hacking around w style sheets
haf Nov 9, 2016
b007c26
wording
haf Nov 9, 2016
a1cd55f
Adding in fonts locally
haf Nov 9, 2016
4a13dc8
Pushing tips.js into the global scope with scripts-loader
haf Nov 9, 2016
0e3d363
Disable MathJax for now
haf Nov 9, 2016
fee664b
Styles work, but something is still off
haf Nov 13, 2016
0344694
Minor update from running yarn
haf May 22, 2017
88a4861
Updating readme with instructions on how to get started
haf May 22, 2017
2687862
Whitespace
haf May 22, 2017
9995b22
Bumping F# dependencies
haf May 22, 2017
bfe719f
Port to Expecto, clean up build
haf May 22, 2017
ac0ccd1
Runs expecto
haf May 22, 2017
f6998dd
Tightening build rules a bit
haf May 22, 2017
a766b10
F# tooltips work again
haf May 22, 2017
470d8f0
Fix build on windows
tpetricek May 22, 2017
9a89724
Merge pull request #1 from tpetricek/offline-develop
May 22, 2017
3687f64
Fix createSlides.fsx
haf May 22, 2017
1e84357
Windows
haf May 22, 2017
869e3e8
Relative path
haf May 22, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
root = true

[*]
end_of_line = lf
charset = utf-8

[*.{fs,fsi,fsx,js,html,css}]
charset = utf-8
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = false

[{package.json,.travis.yml}]
indent_style = space
indent_size = 2
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -189,3 +189,5 @@ src/reveal.js
docs/tools/FSharp.Formatting.svclog
FSharp.Formatting.svclog
_NCrunch*
node_modules/
dist/
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.7.10
10 changes: 4 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
language: objective-c
language: csharp

env:
matrix:
- MONO_VERSION="3.4.0"
mono:
- 4.6.1

install:
- wget "http://download.mono-project.com/archive/3.4.0/macos-10-x86/MonoFramework-MDK-${MONO_VERSION}.macos10.xamarin.x86.pkg"
- sudo installer -pkg "MonoFramework-MDK-${MONO_VERSION}.macos10.xamarin.x86.pkg" -target /
- apt-get update -y

script:
- ./build.sh All
46 changes: 44 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,49 @@ _Inspried by two great works:_

#### See FsReveal slides in action

- [1st sample](http://kimsk.github.io/fsreveal-sample-fsx/FsReveal.html#/) generated from [FsReveal.fsx](https://github.com/kimsk/fsreveal-sample-fsx/blob/master/slides/FsReveal.fsx)
- [2nd sample](http://kimsk.github.io/fsreveal-sample-md/FsReveal.html#/) generated from [FsReveal.md](https://github.com/kimsk/fsreveal-sample-md/blob/master/slides/FsReveal.md) ([raw](https://raw.githubusercontent.com/kimsk/fsreveal-sample-md/master/slides/FsReveal.md))
- [1st sample](http://kimsk.github.io/fsreveal-sample-fsx/FsReveal.html#/)
generated from
[FsReveal.fsx](https://github.com/kimsk/fsreveal-sample-fsx/blob/master/slides/FsReveal.fsx)

- [2nd sample](http://kimsk.github.io/fsreveal-sample-md/FsReveal.html#/)
generated from
[FsReveal.md](https://github.com/kimsk/fsreveal-sample-md/blob/master/slides/FsReveal.md)
([raw](https://raw.githubusercontent.com/kimsk/fsreveal-sample-md/master/slides/FsReveal.md))

### Dev

pyenv local 2.7.10
# npm install -g yarn
yarn install --ignore-engines
yarn run build
# when you want to test your changes:
./build.sh GenerateSlides

Source code is in `./src/FsReveal`. Built with `FAKE` and `yarn` (in turn uses `webpack`).

Source code is **also** in `./docs/tools` for the generation part.

Create a work-in-progress package by

1. Create `paket.local` with
`nuget FsReveal -> source /Users/h/dev/haf/FsReveal/temp version 1.4.0` but
for your own home folder, in the `master` branch.
2. `git checkout develop` to get to this branch.
3. Hack on it
4. `./build.sh NuGet`

#### How it all fits together

The node modules take care of bundling all the JS dependencies. You don't need
anything other than Yarn to compile, but some of them are dependent on having a
binary called 'python2' on your PATH.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

urgs!?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, the wonderful world of JS dev

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why would we need it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know. JS pulls in the world and I'm using the "standard" setup for css/html.


`./src/FsReveal` contain the object model for transforming the Markdown and
literate F# files into slides.

`./src/FsReveal/template.{html,js}` is the entry point for webpack during
packaging.

When you've performed a change to the repo, it's all packaged as a NuGet package. That
NuGet now contains a copy of the compiled JS files, as well as
`./tools/generateSlides.fsx`.
4 changes: 4 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 1.4.0 - 2016-11-09
* Offline support
* Bumping JS deps

### 1.3.1 - 17.06.2016
* BUGFIX: Position tooltips properly on all screens

Expand Down
102 changes: 52 additions & 50 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ open Fake
open Fake.Git
open Fake.AssemblyInfoFile
open Fake.ReleaseNotesHelper
open Fake.Testing.Expecto
open System
open System.IO
#if MONO
Expand Down Expand Up @@ -47,8 +48,8 @@ let tags = "F#, markdown, reveal.js"
// File system information
let solutionFile = "FsReveal.sln"

// Pattern specifying assemblies to be tested using NUnit
let testAssemblies = "tests/**/bin/Release/*Tests*.dll"
// Pattern specifying assemblies to be tested using Expecto
let testExecutables = "tests/**/bin/Release/*Tests.exe"

// Git configuration (used for publishing documentation in gh-pages branch)
// The profile where the project is posted
Expand All @@ -72,65 +73,68 @@ let release = LoadReleaseNotes "RELEASE_NOTES.md"
let outDir = "./docs/output"

let genFSAssemblyInfo (projectPath) =
let projectName = System.IO.Path.GetFileNameWithoutExtension(projectPath)
let basePath = "src/" + projectName
let fileName = basePath + "/AssemblyInfo.fs"
CreateFSharpAssemblyInfo fileName
[ Attribute.Title (projectName)
Attribute.Product project
Attribute.Description summary
Attribute.Version release.AssemblyVersion
Attribute.FileVersion release.AssemblyVersion ]

let genCSAssemblyInfo (projectPath) =
let projectName = System.IO.Path.GetFileNameWithoutExtension(projectPath)
let basePath = "src/" + projectName + "/Properties"
let fileName = basePath + "/AssemblyInfo.cs"
CreateCSharpAssemblyInfo fileName
[ Attribute.Title (projectName)
Attribute.Product project
Attribute.Description summary
Attribute.Version release.AssemblyVersion
Attribute.FileVersion release.AssemblyVersion ]
let projectName = System.IO.Path.GetFileNameWithoutExtension(projectPath)
let basePath = "src/" + projectName
let fileName = basePath + "/AssemblyInfo.fs"
CreateFSharpAssemblyInfo fileName
[ Attribute.Title (projectName)
Attribute.Product project
Attribute.Description summary
Attribute.Version release.AssemblyVersion
Attribute.FileVersion release.AssemblyVersion ]

// Generate assembly info files with the right version & up-to-date information
Target "AssemblyInfo" (fun _ ->
let fsProjs = !! "src/**/*.fsproj"
let csProjs = !! "src/**/*.csproj"
fsProjs |> Seq.iter genFSAssemblyInfo
csProjs |> Seq.iter genCSAssemblyInfo
!! "src/FsReveal/*.fsproj"
|> Seq.iter genFSAssemblyInfo
)

// --------------------------------------------------------------------------------------
// Clean build results

Target "Clean" (fun _ ->
CleanDirs [buildDir; "temp"]
CleanDirs [buildDir; "temp"]
)

Target "CleanDocs" (fun _ ->
CleanDirs [outDir]
CleanDirs [outDir]
)

// --------------------------------------------------------------------------------------
// Build library & test project

let sh exe args =
let exe, args =
if EnvironmentHelper.isUnix
then exe, args else "cmd", ("/C " + exe + " " + args)
shellExec ({ ExecParams.Program = exe
WorkingDirectory = "."
CommandLine = args
Args = [] })
|> function 0 -> () | x -> failwithf "%s %s exited with %i" exe args x

Target "JS" (fun _ ->
sh "yarn" "install --ignore-engines"
sh "yarn" "run build"
)

Target "LoggingFile" (fun _ ->
ReplaceInFiles [ "namespace Logary.Facade", "namespace FsReveal.Logging" ]
[ "paket-files/logary/logary/src/Logary.Facade/Facade.fs" ]
)

Target "Build" (fun _ ->
!! solutionFile
|> MSBuildRelease "" "Rebuild"
|> MSBuildRelease "" "Build"
|> ignore
)

// --------------------------------------------------------------------------------------
// Run the unit tests using test runner

Target "RunTests" (fun _ ->
!! testAssemblies
|> NUnit (fun p ->
{ p with
DisableShadowCopy = true
TimeOut = TimeSpan.FromMinutes 20.
OutputFile = "TestResults.xml" })
!! testExecutables
|> Expecto (fun p -> { p with Parallel = false } )
)

#if MONO
Expand Down Expand Up @@ -158,9 +162,9 @@ Target "SourceLink" (fun _ ->
// --------------------------------------------------------------------------------------
// Build a NuGet package

Target "NuGet" (fun _ ->
Paket.Pack (fun p ->
{ p with
Target "NuGet" (fun _ ->
Paket.Pack (fun p ->
{ p with
Version = release.NugetVersion
ReleaseNotes = toLines release.Notes })
)
Expand All @@ -185,10 +189,10 @@ let generateHelp fail =
failwith "generating help documentation failed"
else
traceImportant "generating help documentation failed"


Target "GenerateHelp" (fun _ ->
DeleteFile "docs/content/release-notes.md"
DeleteFile "docs/content/release-notes.md"
CopyFile "docs/content/" "RELEASE_NOTES.md"
Rename "docs/content/release-notes.md" "docs/content/RELEASE_NOTES.md"

Expand All @@ -202,11 +206,11 @@ Target "GenerateHelp" (fun _ ->

Target "GenerateSlides" (fun _ ->
if executeFSIWithArgs "docs/tools" "createSlides.fsx" [] [] then
traceImportant "Slides generated"
traceImportant "Slides generated"
)


Target "KeepRunning" (fun _ ->
Target "KeepRunning" (fun _ ->
use watcher = new FileSystemWatcher(DirectoryInfo("docs/content").FullName,"*.*")
watcher.EnableRaisingEvents <- true
watcher.Changed.Add(fun e -> generateHelp false)
Expand Down Expand Up @@ -249,10 +253,10 @@ Target "Release" (fun _ ->

Branches.tag "" release.NugetVersion
Branches.pushTag "" "origin" release.NugetVersion

// release on github
createClient (getBuildParamOrDefault "github-user" "") (getBuildParamOrDefault "github-pw" "")
|> createDraft gitOwner gitName release.NugetVersion (release.SemVer.PreRelease <> None) release.Notes
|> createDraft gitOwner gitName release.NugetVersion (release.SemVer.PreRelease <> None) release.Notes
|> releaseDraft
|> Async.RunSynchronously
)
Expand All @@ -266,18 +270,16 @@ Target "All" DoNothing

"Clean"
==> "AssemblyInfo"
==> "JS"
==> "LoggingFile"
==> "Build"
==> "RunTests"
=?> ("GenerateReferenceDocs",isLocalBuild && not isMono)
=?> ("GenerateDocs",isLocalBuild && not isMono)
==> "All"
=?> ("ReleaseDocs",isLocalBuild && not isMono)

"All"
//#if MONO
//#else
// =?> ("SourceLink", Pdbstr.tryFind().IsSome )
//#endif
"All"
==> "NuGet"
==> "BuildPackage"

Expand All @@ -289,7 +291,7 @@ Target "All" DoNothing

"GenerateHelp"
==> "KeepRunning"

"ReleaseDocs"
==> "Release"

Expand Down
Empty file modified build.sh
100644 → 100755
Empty file.
Loading