emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Thoughts on this ob language generator


From: George Mauer
Subject: Thoughts on this ob language generator
Date: Fri, 13 Jan 2023 20:11:29 -0600

I had a need the other day to execute some typescript in an org document. Now I know that there's an ob-typescript package but that doesn't quite work the way I want and expects typescript to be installed globally (which runs into a variety of versioning issues).

There is a better option available with the `npx` program (installed alongside `npm`) which can install a package along with its dependencies into a temporary sandbox and run its binaries.

I rewrote the typescript babel plugin to do this and then realized that there was relatively little in it beyond variable and function names that was typescript-specific. The exact same process can be used for anything that has an interpreter up on npm. Coffeescript, mermaidjs, all sorts of things.

So I made a macro. I'm interested what people here think: https://github.com/togakangaroo/create-ob-npx

reply via email to

[Prev in Thread] Current Thread [Next in Thread]