From 3aff9873d64ead8e84c735210a39ffdb9798e53b Mon Sep 17 00:00:00 2001 From: Steffen Forkmann Date: Sun, 14 Jun 2015 18:27:07 +0200 Subject: [PATCH] Create CSS dir fi it doesn't exist. relates to https://github.com/fsprojects/FsReveal/pull/76 --- RELEASE_NOTES.md | 2 +- src/FsReveal/FsReveal.fs | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 38a58a1..1e4b21c 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,4 +1,4 @@ -### 0.10.3 - 14.06.2015 +### 0.10.4 - 14.06.2015 * Do not double-format already highlighted code ### 0.10.1 - 11.06.2015 diff --git a/src/FsReveal/FsReveal.fs b/src/FsReveal/FsReveal.fs index a8101d9..0b3312a 100644 --- a/src/FsReveal/FsReveal.fs +++ b/src/FsReveal/FsReveal.fs @@ -35,7 +35,12 @@ type FsReveal private() = let output = Formatting.GenerateHTML template presentation File.WriteAllText(outDir @@ outFile, output) printfn "Copy fsreveal.css style from %s to %s" FsRevealHelper.StyleFile (outDir @@ "css") - File.Copy(FsRevealHelper.StyleFile, (outDir @@ "css" @@ "fsreveal.css"), true) + let cssDir = outDir @@ "css" + if Directory.Exists cssDir |> not then + Directory.CreateDirectory cssDir |> ignore + printfn "Creating %s.." cssDir + + File.Copy(FsRevealHelper.StyleFile, cssDir @@ "fsreveal.css", true) static let getPresentationFromScriptLines fsxFile fsiEvaluator lines = let fsx = Formatting.preprocessing lines