Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
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.
Get started
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.ipynbnotebook using your preferred notebook editor - make sure
denokernel 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
Moving beyond Hello world
There are 2 apps that are built using Jurassic that you can look at for inspiration:
Add Package
deno add jsr:@jurassic/jurassic
Import symbol
import * as jurassic from "@jurassic/jurassic";
Import directly with a jsr specifier
import * as jurassic from "jsr:@jurassic/jurassic";
Add Package
pnpm i jsr:@jurassic/jurassic
pnpm dlx jsr add @jurassic/jurassic
Import symbol
import * as jurassic from "@jurassic/jurassic";
Add Package
yarn add jsr:@jurassic/jurassic
yarn dlx jsr add @jurassic/jurassic
Import symbol
import * as jurassic from "@jurassic/jurassic";
Add Package
vlt install jsr:@jurassic/jurassic
Import symbol
import * as jurassic from "@jurassic/jurassic";
Add Package
npx jsr add @jurassic/jurassic
Import symbol
import * as jurassic from "@jurassic/jurassic";
Add Package
bunx jsr add @jurassic/jurassic
Import symbol
import * as jurassic from "@jurassic/jurassic";