From 83aa372345367c2e1732b1fd23f97b422399ede4 Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Mon, 1 Apr 2024 06:47:09 +0200 Subject: [PATCH] chore,docs: add Nix shell, update readme accordingly --- README.org | 14 ++++++++++---- shell.nix | 9 +++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 shell.nix diff --git a/README.org b/README.org index 3ccd939..3e0e3cf 100644 --- a/README.org +++ b/README.org @@ -57,14 +57,20 @@ npm install # delete the yarn.lock file first Once this is done, you can launch a preview of the project. #+begin_src shell -yarn docs:dev +yarn dev # or -npm run docs:dev +npm run dev #+end_src You can also compile the project to a static website. #+begin_src shell -yarn docs:build +yarn build # or -npm run docs:build +npm run build #+end_src + +** With Nix shell +A Nix shell is available for running the project without the Emacs +part. Simply run =nix-shell= in the project root. You’ll get the latest +version of =yarn= installed and should be able to run the commands +above. diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..5fb69b9 --- /dev/null +++ b/shell.nix @@ -0,0 +1,9 @@ +{ pkgs ? import {} }: +pkgs.mkShell { + nativeBuildInputs = with pkgs.buildPackages; [ + corepack + ]; + shellHook = '' +yarn set version stable +''; +}