-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reason syntax #5
Comments
Ideally it would be interactive (and with runnable examples!), but that'd take a bit of work (though it also gives lots of other benefits too of course). Inline would be a bit heavy and difficult to maintain I think, but a separate page shouldn't be too hard to automate. |
if you're happy to have a small express server behind it, I can whip something up that serves those snippets with a toggle pretty easily (done it before) |
For the toggle, couldn't we just translate them and inline them as text in the code? |
depends on how you'd like to store them. if we want to ship them in the bundle, or as a bunch of files, then yes. if you want to ship them async from the server and have a smaller faster bundle, then no. I guess once you go interactive, then definitely 😄 but before then, you can just store them as .re and .ml and toggle a component that fetches the right one from the server. too complex? |
or do you mean run a jsoo compiled bucklescript and literally translate them? |
Some prepublish script that uses your local refmt and goes through snippets. This way the page's serverless. Though it's kinda tempting to dog food bs-express =P Related: reasonml/reason#960 |
ooh, cool PR. At the point that we have the interpreter it's definitely less of an issue. Should we maybe sync up with @jaredly on updating the bucklescript jsoo version and wrapping it with a reason-react component that can render an example and a snippet? I'm happy to take a shot at prototyping something like that. |
In terms of ease of maintenance, a script that reads the markdown and replaces the contents of each |
Absolutely! You want to take a shot at it @zploskey ? |
Sure, I'll take a shot at it over the weekend. |
Would love to see this updated for Rescript 🥲 |
This is still very relevant for Melange, the spiritual successor to BuckleScript, I think. And there's enough differences in rescript libraries, idioms and just what's plain possible with the new syntax that it's probably best to make it a fork. If anyone's asking for my permission to do that, you certainly have it 🙂 |
@glennsl how do you want to do this? Inline before/after the ocaml snippets? Another doc page? Interactive web page?
The text was updated successfully, but these errors were encountered: