-
-
Notifications
You must be signed in to change notification settings - Fork 566
/
Makefile
48 lines (36 loc) · 1.11 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
.PHONY: it
it: fix stan test docs ## Run the commonly used targets
.PHONY: help
help: ## Displays this list of targets with descriptions
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(firstword $(MAKEFILE_LIST)) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: setup
setup: vendor phpstan.neon ## Set up the project
.PHONY: fix
fix: rector php-cs-fixer ## Automatic code fixes
.PHONY: rector
rector: vendor ## Automatic code fixes with Rector
composer rector
.PHONY: php-cs-fixer
php-cs-fixer: vendor ## Fix code style
composer php-cs-fixer
phpstan.neon:
printf "includes:\n - phpstan.neon.dist" > phpstan.neon
.PHONY: stan
stan: ## Runs static analysis with phpstan
composer stan
.PHONY: test
test: ## Runs tests with phpunit
composer test
.PHONY: bench
bench: ## Runs benchmarks with phpbench
composer bench
.PHONY: docs
docs: ## Generate the class-reference docs
php generate-class-reference.php
prettier --write docs/class-reference.md
vendor: composer.json composer.lock
composer install
composer validate
composer normalize
composer.lock: composer.json
composer update