# --- Development Tools ---

.PHONY: install-git-hooks sync-prototypes install-melos

install-melos:
	@if ! command -v melos >/dev/null 2>&1; then \
		echo "--> Melos not found. Installing globally via dart pub..."; \
		dart pub global activate melos; \
	else \
		echo "✅ Melos is already installed."; \
	fi

install-git-hooks:
	@echo "--> Installing Git hooks..."
	@ln -sf ../../scripts/git-hooks/pre-push .git/hooks/pre-push
	@echo "✅ pre-push hook installed successfully. Direct pushes to 'main' and 'dev' are now blocked."

sync-prototypes:
	@echo "--> Synchronizing prototypes from external repository..."
	@./scripts/sync-prototypes.sh
