1
0
silverbullet/website/Development.md
2023-12-19 16:18:33 +01:00

1.6 KiB

Stack

SilverBullet is written in TypeScript and built on top of the excellent CodeMirror 6 editor component. Additional UI is built using Preact. ES Build is used to build both the front-end and back-end bundles. The server backend runs as an HTTP server on Deno using Oak.

Development

Requirements: Deno 1.39 or newer. If you installed Install/Deno SilverBullet you will already have your toolchain installed. Convenient!

Clone the repository from GitHub:

git clone git@github.com:silverbulletmd/silverbullet.git
cd silverbullet

And build it:

deno task build

For convenience, replace your silverbullet install with the one from this repo via:

deno task install

You can now run the server in “watch mode” (automatically restarting when you change source files) with:

deno task watch-server <PATH-TO-YOUR-SPACE>

It's convenient to run three commands in parallel (in separate terminals):

deno task watch-web
deno task watch-server <PATH-TO-YOUR-SPACE>
deno task watch-plugs

All of these watch for file changes and a rebuild should trigger automatically.

Note that there are dependencies between these builds. Any change to any of the built-in plugs requires a rebuild of the web app. Any rebuild of the web app will only be picked up by the server after it restarts (which should happen automatically).