.PHONY: help setup-pre-commit lint fmt test clean contracts-build contracts-clean
help:
@echo "Available targets:"
@echo ""
@echo "Development:"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | grep -E "(setup-pre-commit|lint|fmt|test)" | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}'
@echo ""
@echo "Build & Clean:"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | grep -E "(clean|contracts)" | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}'
@echo ""
@echo "Individual tools (advanced):"
@echo " \033[36m./bin/lint --help\033[0m Show lint options (--rust, --cairo, --prettier, --all, --check-only)"
@echo " \033[36m./bin/rust-lint\033[0m Rust formatting & linting"
@echo " \033[36m./bin/cairo-lint\033[0m Cairo formatting"
@echo " \033[36m./bin/prettier-lint\033[0m Prettier formatting"
@echo " \033[36m./bin/test\033[0m Run all tests including examples"
setup-pre-commit:
@./bin/setup-pre-commit
lint:
@./bin/lint --all --check-only
test:
@./bin/test
clean:
@echo "๐งน Cleaning build artifacts..."
@cargo clean
@cd contracts && scarb clean
contracts-build:
@echo "๐๏ธ Building contracts..."
@make -C contracts generate_artifacts
contracts-clean:
@cd contracts && scarb clean