diff --git a/flake.nix b/flake.nix index 2d4380f..e01a16e 100644 --- a/flake.nix +++ b/flake.nix @@ -6,24 +6,6 @@ outputs = { self, nixpkgs }: let system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; - - #Shell scripts for managing the two package maangers from one interface - build-tailwind = pkgs.writeShellScriptBin "build-tailwind" '' - #!/usr/bin/env zsh - set -e - export PATH=${pkgs.nodejs_20}/bin:${pkgs.nodePackages_latest.pnpm}/bin:$PATH - pnpm dlx tailwindcss -i src/styles/tailwind.css -o assets/main.css --watch - ''; - run-dev = pkgs.writeShellScriptBin "run-dev" '' - #!/usr/bin/env zsh - set -e - cargo watch -x 'run test_data/test.json' - ''; - run-prettier = pkgs.writeShellScriptBin "run-prettier" '' - #!/usr/bin/env zsh - set -e - pnpm prettier --write --ignore-unknown . - ''; in { defaultPackage.${system} = with pkgs; stdenv.mkDerivation { @@ -36,6 +18,7 @@ rustc cargo cargo-watch + just nodejs_20 nodePackages_latest.pnpm ]; @@ -46,9 +29,5 @@ export OPENSSL_INCLUDE_DIR=${openssl.dev}/include ''; }; - - build-tailwind = build-tailwind; - run-dev = run-dev; - run-prettier = run-prettier; }; } diff --git a/justfile b/justfile new file mode 100644 index 0000000..f4bd1ae --- /dev/null +++ b/justfile @@ -0,0 +1,12 @@ +tailwind: + export PATH=${pkgs.nodejs_20}/bin:${pkgs.nodePackages_latest.pnpm}/bin:$PATH + pnpm dlx tailwindcss -i src/styles/tailwind.css -o assets/main.css --watch + +dev: + cargo watch -x 'run test_data/test.json' + +prettier: + pnpm prettier --write --ignore-unknown . + +init-env: + pnpm i