add makefile as proxy for nix develop commands

This commit is contained in:
2025-09-27 14:34:11 +02:00
parent f31b8cc522
commit d034650a90

60
Makefile Normal file
View File

@@ -0,0 +1,60 @@
# 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
# Default target
help:
@echo "Strudel Development Makefile"
@echo ""
@echo "Available targets:"
@echo " help - Show this help message"
@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 pnpm install
# Start development server
dev:
nix develop --command pnpm dev
# Build the project
build:
nix develop --command pnpm build
# Run tests
test:
nix develop --command pnpm test
# Run linter
lint:
nix develop --command pnpm lint
# Format code
format:
nix develop --command pnpm codeformat
# Run all checks
check:
nix develop --command pnpm check
# Clean build artifacts
clean:
nix develop --command pnpm clean 2>/dev/null || true
rm -rf node_modules/.cache 2>/dev/null || true
rm -rf dist 2>/dev/null || true
# Enter Nix development shell
shell:
nix develop