I write most of my packages in Pluto! I don’t use a tool to convert from Pluto to something else, but the Pluto files are used directly as source code! This is a (secret) design goal of Pluto, and we have features like https://github.com/fonsp/Pluto.jl/pull/2018 to make this easier.
You can use Pluto notebooks as parts of an existing codebase, like in:
- Pluto: e.g. Pluto.jl/ANSIEmulation.jl at main · fonsp/Pluto.jl · GitHub
- PlutoUI: e.g. PlutoUI.jl/Scrubbable.jl at main · JuliaPluto/PlutoUI.jl · GitHub
This is really useful if you have a fairly isolated piece of functionality. Pluto makes it really easy and fast to develop, document and test (with PlutoTest.jl (reactive tests with time machine)) at once.
(Large notebooks, with lots and lots of cells, are super useful for this! If you want to work on multiple parts at once, you can just open the same notebook in two windows side-by-side.)
You can also use Pluto to write all code of a package, including package tests (with CI) and documentation (CI & GitHub Pages). Examples:
- GitHub - fonsp/Promises.jl: Use JavaScript Promises syntax in Julia! (alpha)
- GitHub - JuliaPluto/PlutoTest.jl: ✔️ Visual, reactive testing library for Julia. Time machine included. (although this is tricky as a template because it doesn’t use PlutoTest, it is PlutoTest).
The real expert in this area is @disberd, he works on packages composed of multiple Pluto notebooks with lots of cool macros and tricks to optimise his workflow.
This process definitely has some rough edges (exciting to see if Nbdev.jl can help here!) but I would totally recommend people to experience this for themselves!