Jurassic lets you write and ship software in Jupyter notebooks using Deno. It's inspired by nbdev and is made possible by Deno Jupyter kernel.
Make sure you have Deno installed on your machine. You will also need Deno jupyter runtime.
Run the following command to bootstrap a project (feel free to change
hellojurassic
to something more appropriate)
deno run --reload -R -W -N --allow-run jsr:@jurassic/jurassic/init hellojurassic
Head to your newly created project directory and let's take a look around
cd hellojurassic
Your project should look something like this:
.
βββ app.test.ts
βββ mod.ts
βββ nbs
β βββ app.ipynb
βββ hellojurassic
β βββ app.ts
βββ _docs
β βββ .vitepress
β β βββ config.mts
β βββ public
β β βββ logo.png
β βββ app.md
β βββ package.json
β βββ index.md
β βββ get-started.md
βββ docs
β βββ public
β β βββ logo.png
β βββ package.json
β βββ index.md
β βββ get-started.md
βββ deno.json
βββ deno.lock
βββ jurassic.json
βββ .gitignore
βββ .github
βββ workflows
βββ publish.yml
βββ pr.yml
Here's a quick overview of different parts of the project
Entry | Description |
---|---|
.github/workflows/ | GH actions for building, testing and documenting your project |
docs | Additional content and static files for documentation |
hellojurassic/ | Project typescript module - these files are automatically generated from notebooks |
nbs | Notebooks containing application code and documentation |
app.test.ts | Application unit tests |
jurassic.json | Jurassic project configuration file |
mod.ts | Main module entry point for your application |
Head to mod.ts
and let's replace export * from "./hellojurassic/app.ts";
with the following
import { app } from "./hellojurassic/app.ts";
app();
You can now run your app using
deno run ./mod.ts
Let's modify the app and rerun it:
- open
nbs/app.ipynb
notebook using your preferred notebook editor - make sure
deno
kernel is selected - locate application code cell
//| export
export const app = () => {
console.log("Hello, World!");
};
- let's change this to be
//| export
export const app = () => {
console.log("Hey!");
};
- save your notebook and rebuild your app
deno task build
- and rerun it using
deno run ./mod.ts
There are 2 apps that are built using Jurassic that you can look at for inspiration: