mirror of
https://codeberg.org/keyoxide/keyoxide-web.git
synced 2024-12-22 06:49:29 -07:00
Adding quick dev setup using nix and direnv
This commit is contained in:
parent
50bc13b8e5
commit
67710a1531
4 changed files with 20 additions and 0 deletions
1
.envrc
Normal file
1
.envrc
Normal file
|
@ -0,0 +1 @@
|
|||
use nix
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -28,3 +28,4 @@
|
|||
node_modules
|
||||
.editorconfig
|
||||
.env
|
||||
/.direnv/
|
||||
|
|
|
@ -44,6 +44,8 @@ To run Keyoxide locally on your machine for development:
|
|||
- directly from their [website](https://nodejs.org/en/), or
|
||||
- using [nvm](https://github.com/nvm-sh/nvm): `nvm install --lts; nvm use --lts`
|
||||
- [yarn](https://yarnpkg.com/)
|
||||
- [nix](https://nixos.org/guides/install-nix.html) with
|
||||
[direnv](https://direnv.net/) will install yarn and other dependencies.
|
||||
- install dependencies with `npm install` or `yarn`
|
||||
- run the server with `npm dev` or `yarn dev`
|
||||
|
||||
|
|
16
shell.nix
Normal file
16
shell.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
|
||||
{ pkgs ? import <nixpkgs> {}}:
|
||||
let
|
||||
unstable = import (fetchTarball "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz") {};
|
||||
in
|
||||
pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs; [
|
||||
nodejs
|
||||
yarn
|
||||
xvfb_run
|
||||
unstable.cypress
|
||||
];
|
||||
|
||||
CYPRESS_INSTALL_BINARY=0; #skip installing the Cypress binary from yarn
|
||||
CYPRESS_RUN_BINARY="${unstable.cypress}/bin/Cypress";
|
||||
}
|
Loading…
Reference in a new issue