fsprojects / FsReveal

FsReveal parses markdown and F# script file and generates reveal.js slides.
http://fsprojects.github.io/FsReveal
258 stars 102 forks source link

Feature/offline #103

Open haf opened 7 years ago

haf commented 7 years ago

The aim of the PR is to make FsReveal function without internet access. This means we need to pull in all of the code as a single compilation unit:

haf commented 7 years ago

What's the way to test if what I've done works? There are no docs what so ever about how to run this thing in dev mode...?

forki commented 7 years ago

good question. did not do this for very long time.

probably by copying things manually in place

haf commented 7 years ago

While you have a look at that, here are the main changes:

This will make it:

QA needed on:

Help needed on:

AFK for a while now; I need to write my presentation too. Which btw I could hold for the F# community too; intro to Kafka.

forki commented 7 years ago

upgrading reveal was always easy.

https://github.com/fsprojects/FsReveal/blob/develop/paket.dependencies#L6 so it was only a git push on the reveal clone (please note we explicitly maintain the fork, since we often are a couple of commits in front of reveal.js master)

haf commented 7 years ago

I did notice a strange reveal.js-[GITHASH] folder in the fork; is that where you want me to use the files from? Why not just merge it into the files of the actual repo?

forki commented 7 years ago

suave is taken via paket from nuget.

haf commented 7 years ago

@kimsk @troykershaw What css file am I missing? Only getting white BG:

screen shot 2016-11-09 at 17 55 01
kimsk commented 7 years ago

It looks like the reveal.js css theme is missing. Those files are something like css/theme/night.css in reveal.js.

haf commented 7 years ago

@kimsk Thanks; the last two issues are:

screen shot 2016-11-13 at 16 41 40 screen shot 2016-11-13 at 16 41 45
ErikSchierboom commented 7 years ago

I've just tested this on my MacBook, and here are my findings:

ERROR in ./template.js
Module not found: Error: Cannot resolve 'file' or 'directory' ../../paket-files/fsprojects/reveal.js/css/reveal.css in /Users/erikschierboom/Programming/FsReveal/src/FsReveal
 @ ./template.js 3:0-64 43:2-66

Having run build.sh first and then the yarn commands fixes it.

image

haf commented 7 years ago

You need to run Suave like in my screenshots above... Could you do that?

ErikSchierboom commented 7 years ago

@haf Sorry, but how do I do that? If I run a local node http-server, things don't work:

image

I'm a bit confused a to why Suave would be necessary. Wasn't the whole point being that it could run offline?

haf commented 7 years ago

Yes, it runs offline from the point of view of your laptop. Just because we start a local web server, we don't have internet.

Today we can't show the presentation without internet.

I'll see what I can whip together in the form of a readme.

ErikSchierboom commented 7 years ago

@haf Okay, clear. But shouldn't running http-server in the dist directory be working? In my screenshot above, you can see that it didn't.

A readme would be much appreciated!

haf commented 7 years ago

I've updated the READMEs with that information now @ErikSchierboom

haf commented 7 years ago

How to test:

check out the two branches. First build this PR with ./build NuGet then add paket.local in the other PR (see README.md) to point to the new nuget, then do .paket/paket.exe restore to use it. Now you can run ./build in the other PR to run the server.

haf commented 7 years ago

I think it's worth merging now and fixing remaining issues together with the community: e.g. the pretty-printed code lines being slightly off, bumping reveal.js in the fsprojects org and going through its themes, removing downloads from googleapis.com. Also themes and speaker notes aren't really working, but now I have to write my presentation! :)

ErikSchierboom commented 7 years ago

Thanks @haf!

dustinlacewell-wk commented 6 years ago

Any chance of this?

haf commented 6 years ago

Need someone to pick up the slack. I don't have the bandwidth to complete this refactor (but it's working now, so someone just needs to merge it and test it in full)