# Transforming a Pluto notebook into a Julia package

**URL:** https://discourse.julialang.org/t/transforming-a-pluto-notebook-into-a-julia-package/60789
**Category:** Pluto
**Created:** [May 8, 2021, 6:47pm UTC](https://discourse.julialang.org/t/transforming-a-pluto-notebook-into-a-julia-package/60789 "2021-05-08T18:47:14Z")
**Posts on this page:** 1
**Showing post:** 16

<div class="post-metadata">

### Author: ![fonsp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fonsp/32/222349_2.png) [@fonsp](https://discourse.julialang.org/u/fonsp)
#### Post date: [April 26, 2023, 9:11pm UTC](https://discourse.julialang.org/t/transforming-a-pluto-notebook-into-a-julia-package/60789/16 "2023-04-26T21:11:29Z")

</div>

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](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](https://github.com/fonsp/Pluto.jl/blob/main/src/packages/ANSIEmulation.jl)
- PlutoUI: e.g. [PlutoUI.jl/Scrubbable.jl at main · JuliaPluto/PlutoUI.jl · GitHub](https://github.com/JuliaPluto/PlutoUI.jl/blob/main/src/Scrubbable.jl)

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](https://github.com/JuliaPluto/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)](https://github.com/fonsp/Promises.jl)
- [GitHub - JuliaPluto/PlutoTest.jl: ✔️ Visual, reactive testing library for Julia. Time machine included.](https://github.com/JuliaPluto/PlutoTest.jl) (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!

---

_[View the full topic](https://discourse.julialang.org/t/transforming-a-pluto-notebook-into-a-julia-package/60789)._
