-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (37 loc) · 1.78 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
# Executables
PHP = php
NODE = node
NPM = npm
VALET = valet
COMPOSER = composer
# Misc
.DEFAULT_GOAL = help
.PHONY = help build up start down logs sh composer vendor sf cc
## —— Makefile —————————————————————————————————————————————————————————————
help: ## Outputs this help screen
@grep -E '(^[a-zA-Z0-9_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}{printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'
## —— DEV ——————————————————————————————————————————————————————————————
dev-setup: ## Install dependencies
@$(COMPOSER) install
@$(NPM) install
dev-watch: ## Start watching assets
@$(NPM) run watch
dev-build: ## Compile assets in DEV mode
@$(NPM) run dev
dev-link: ## links the project to portfolio.test
@$(VALET) link portfolio
## —— PROD ——————————————————————————————————————————————————————————————
prod-setup: ## Install vendor dependencies
@$(COMPOSER) install --prefer-dist --no-interaction
@$(NPM) ci
prod-build: ## Compile assets in DEV mode
@$(NPM) run prod
$(PHP) bin/build.php
$(PHP) bin/thumbnails.php
cp -R public/css docs
cp -R public/img docs
cp CNAME docs
cp public/favicon.ico docs
## —— QA ——————————————————————————————————————————————————————————————
qa: ## Run code quality tools
@$(PHP) vendor/bin/phpstan