diff --git a/.gitignore b/.gitignore index 4e6c00db..46007e22 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules build -json-schema-cache \ No newline at end of file +json-schema-cache +/node diff --git a/README.md b/README.md index 2001c8ec..e7e8dae7 100644 --- a/README.md +++ b/README.md @@ -315,6 +315,14 @@ bm-create-pr --target Add --individual flag to import layer into standalone individual config file, otherwise import into aerial map. Add --vector flag to import new layer into vector map. +## Development environment + +Prerequisite: [Nix](https://nixos.org/download/) + +When entering the project directory, run `nix-shell` to activate the development environment. + +On initial use, and when `package-lock.json` changes, run `npm i` to install Node.js packages. This will create a `node` executable in the root of the repo which you can use as the IDE interpreter. + ## Versioning and Release To publish a release, the Pull Request opened by `release-please` bot needs to be merged: diff --git a/shell.nix b/shell.nix new file mode 100644 index 00000000..ac45d558 --- /dev/null +++ b/shell.nix @@ -0,0 +1,17 @@ +let + pkgs = import (builtins.fetchTarball { + name = "nixos-unstable-2024-09-17"; + url = "https://github.com/nixos/nixpkgs/archive/345c263f2f53a3710abe117f28a5cb86d0ba4059.tar.gz"; + sha256 = "1llzyzw7a0jqdn7p3px0sqa35jg24v5pklwxdybwbmbyr2q8cf5j"; + }) { }; + nodejs = pkgs.nodejs; +in +pkgs.mkShell { + packages = [ + pkgs.bashInteractive + nodejs + ]; + shellHook = '' + ln --force --no-target-directory --symbolic "${nodejs}/bin/node" node + ''; +}