1
0
silverbullet/website/🔨 Development.md
2022-11-27 11:21:03 +01:00

1.5 KiB

Stack

Silver Bullet 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 a HTTP server on Deno using Oak.

Development

Requirements: Deno 1.28 or newer. If you are running Silver Bullet, you will already have Deno installed.

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).