From 56ad0452dba15eaa724a29986fc6afab6f7ac8be Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 3 Jul 2023 00:33:32 +0200 Subject: [PATCH] Improve quickstart development docs --- README.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 385a567..42cb121 100644 --- a/README.md +++ b/README.md @@ -3,19 +3,30 @@ This is the repository containing the code for https://pub.solar. It is built using [lume](https://lume.land/) with JSX. To get started, make sure -you're loading all dependencies via `direnv`: +you have the [nix package manager](https://nixos.org/download.html) installed. +Then you can start developing with: ``` -$ direnv allow +nix develop ``` -This will use nix shell to create an environment that has deno and lume +This will use a [nix devshell](https://nix.dev/tutorials/first-steps/ad-hoc-shell-environments#ad-hoc-envs) +to create an environment that has [deno](https://deno.land/) and [lume](https://lume.land/) available. +An alternative approach for loading all dependencies is [`direnv`](https://direnv.net). +It basically runs `nix develop` for you, once you enter a directory which +contains a `.envrc` file and allow it by running `direnv allow`. Once installed +globally, run: + +``` +direnv allow +``` + To get a live development server, run ``` -$ deno task serve +deno task serve ``` Unfortunately, hot module reloading is currently broken for JSX modules, so