Something went wrong. Try again.
svelte astro
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677{ description = "Development environment for Cosmo";
inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-parts.url = "github:hercules-ci/flake-parts"; };
outputs = inputs@{ flake-parts, ... }: flake-parts.lib.mkFlake { inherit inputs; } { systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
perSystem = { pkgs, system, ... }: { devShells.default = pkgs.mkShell { buildInputs = with pkgs; [ bun svelte-language-server ];
shellHook = '' echo "bun: $(bun --version)" ''; };
apps.dev = { type = "app"; program = toString ( pkgs.writeShellScript "publish" '' export PATH="${pkgs.bun}/bin:$PATH" bun run dev '' ); };
apps.deploy = { type = "app"; program = toString ( pkgs.writeShellScript "publish" '' set -euo pipefail export PATH="${pkgs.bun}/bin:$PATH"
bun run build
if [ -n "$(git status --porcelain)" ]; then tag=$(git describe --tags --abbrev=0 2>/dev/null || echo "untagged") git add -A git commit -m "chore($tag): new changes" fi
git log origin/main..HEAD --oneline
if [ -z "$(git log origin/main..HEAD --oneline)" ]; then exit 0 fi
read -p "Confirm push? [Y/n] " answer answer=''${answer:-Y}
case "$answer" in [Yy]*) git push origin main ;; *) exit 1 ;; esac '' ); }; }; };}