# Makefile for Strudel development # This Makefile acts as a proxy for nix develop commands .PHONY: help install dev build test lint format check clean shell submodules-init submodules-update update # Default target help: @echo "Strudel Development Makefile" @echo "" @echo "Available targets:" @echo " help - Show this help message" @echo " update - Initialize and update git submodules" @echo " install - Install dependencies (pnpm install)" @echo " dev - Start development server (pnpm dev)" @echo " build - Build the project (pnpm build)" @echo " test - Run tests (pnpm test)" @echo " lint - Run linter (pnpm lint)" @echo " format - Format code (pnpm codeformat)" @echo " check - Run all checks (pnpm check)" @echo " clean - Clean build artifacts" @echo " shell - Enter Nix development shell" @echo "" @echo "All commands run within the Nix development environment." # Install dependencies install: nix develop --command sh -c "cd src && pnpm install" # Start development server dev: nix develop --command sh -c "cd src && pnpm dev" # Build the project build: nix develop --command sh -c "cd src && pnpm build" # Run tests test: nix develop --command sh -c "cd src && pnpm test" # Run linter lint: nix develop --command sh -c "cd src && pnpm lint" # Format code format: nix develop --command sh -c "cd src && pnpm codeformat" # Run all checks check: nix develop --command sh -c "cd src && pnpm check" # Clean build artifacts clean: nix develop --command sh -c "cd src && pnpm clean 2>/dev/null || true" rm -rf src/node_modules/.cache 2>/dev/null || true rm -rf src/dist 2>/dev/null || true # Initialize submodules submodules-init: git submodule init # Update submodules submodules-update: git submodule update # Initialize and update submodules update: git submodule init && git submodule update # Enter Nix development shell shell: nix develop