1
0
silverbullet/website/🔨 Development.md

42 lines
1.5 KiB
Markdown
Raw Normal View History

2022-06-28 12:14:15 +00:00
## Stack
SilverBullet is written in [TypeScript](https://www.typescriptlang.org/) and built on top of the excellent [CodeMirror 6](https://codemirror.net/) editor component. Additional UI is built using [Preact](https://preactjs.com/). [ES Build](https://esbuild.github.io) is used to build both the front-end and back-end bundles. The server backend runs as an HTTP server on [Deno](https://deno.land/) using [Oak](https://oakserver.github.io/oak/).
2022-06-28 12:14:15 +00:00
## Development
Requirements: [Deno](https://deno.land/) 1.33 or newer. If you are running SilverBullet, you will already have Deno installed.
2022-06-28 12:14:15 +00:00
Clone the repository from GitHub:
2022-11-27 10:21:03 +00:00
```shell
git clone git@github.com:silverbulletmd/silverbullet.git
cd silverbullet
```
And build it:
2022-06-28 12:14:15 +00:00
2022-10-10 12:55:48 +00:00
```shell
deno task build
```
2022-06-28 12:14:15 +00:00
2022-11-27 10:21:03 +00:00
For convenience, replace your `silverbullet` install with the one from this repo via:
```shell
deno task install
```
You can now run the server in “watch mode” (automatically restarting when you change source files) with:
2022-10-10 12:55:48 +00:00
```shell
2022-10-29 14:57:12 +00:00
deno task watch-server <PATH-TO-YOUR-SPACE>
2022-10-10 12:55:48 +00:00
```
2022-06-28 12:14:15 +00:00
2022-11-27 10:21:03 +00:00
It's convenient to run three commands in parallel (in separate terminals):
2022-06-28 12:14:15 +00:00
```shell
2022-10-10 12:55:48 +00:00
deno task watch-web
2022-10-29 14:57:12 +00:00
deno task watch-server <PATH-TO-YOUR-SPACE>
2022-10-10 12:55:48 +00:00
deno task watch-plugs
2022-06-28 12:14:15 +00:00
```
2022-11-27 10:21:03 +00:00
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).