symphony-org / frost

Frost
BSD 3-Clause "New" or "Revised" License
19 stars 5 forks source link

Compiled Code Snippets #11

Open GrafBlutwurst opened 5 years ago

GrafBlutwurst commented 5 years ago

Like tut or babbel. Allow for code snippets to be compiled against a project so they don't get stale.

EncodePanda commented 5 years ago

@GrafBlutwurst Can I assume that for now you require integration with tut? Or you would like to have full tut experience in frost? Honestly I would rather have a plugin that integrates nicely with tut.

Let's say you have a tut example in src/tut/examples.md that looks like

Here is how you add numbers:
```tut
1 + 1

The plugin could look like

Scala Example

path=src/tut/examples.md

and then the plugin would 
1. run `sbt tutOnly path`
2. substitute the `tut` output with plugin content

So that finally documentation generated by `frost` would be

Scala Example

Here is how you add numbers:

scala> 1 + 1
res0: Int = 2


Would that work?
GrafBlutwurst commented 5 years ago

yeah integration with tut like this would be cool. What other tools would there be for other languages? Maybe emacs' babel can be an inspiration here?