trypurescript icon indicating copy to clipboard operation
trypurescript copied to clipboard

Extract client code into a plugin

Open owickstrom opened this issue 9 years ago • 7 comments

After some discussion with Phil about how we could improve documentation for PureScript libraries, we arrived at a design where we would like to have GitHub Pages-hosted documents easily embed runnable PureScript snippets, with something like script or pre tags, and a plugin that adds a "Run" button, posts the code to the Try PS API when the user clicks, and finally renders the output (below the snippet).

I have not had time to look into how this code is doing stuff right now, just throwing this out there. :smile:

Thx!

owickstrom avatar Dec 05 '16 18:12 owickstrom

👍 I think the simplest thing we can do here is to just extract the code which calls the service and runs the generated JS in an iframe, into its own JS library which can be included in documentation/blogs etc.

paf31 avatar Dec 06 '16 04:12 paf31

Hopefully I'll start working on this this week

soupi avatar Dec 26 '16 06:12 soupi

Some stuff came up. May take a bit longer until I can work on this. Sorry.

soupi avatar Jan 03 '17 07:01 soupi

No rush at all, thanks!

paf31 avatar Jan 03 '17 17:01 paf31

@paf31 @soupi this will be an awesome feature.

We can embed in documentation / help. Most importantly we can create something like a Notebook where people can type code and execute. Would be super useful for building Interactive training material ;)

sudhirvkumar avatar Aug 12 '17 19:08 sudhirvkumar

I'm sorry I haven't implemented this yet. If anyone wants to pick this up they are welcomed to. It might take a bit of time until I can work on this.

soupi avatar Aug 12 '17 20:08 soupi

let me try this next weekend

sudhirvkumar avatar Aug 12 '17 20:08 sudhirvkumar