mirror of
https://codeberg.org/keyoxide/keyoxide-web.git
synced 2024-12-22 23:09:29 -07:00
Merge pull request 'Adding quick dev setup using nix and direnv' (#100) from yisraeldov/keyoxide-web:nix-shell into main
Reviewed-on: https://codeberg.org/keyoxide/keyoxide-web/pulls/100
This commit is contained in:
commit
8bdc7c4cf6
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