.DEFAULT_GOAL := help
.PHONY: *
theme := proudnerds

install: clean setup build ## Clean the vendor directory, run composer install, build the theme
prod: build ## Build for production
dev: dev ## Build for development

clean: ## Clean the vendor directory and the node modules
	@echo "Cleaning vendor and node_modules directories"
	@rm -rf ./node_modules

setup: ## Run composer install and compile the theme
	@echo "Executing: yarn install"
	yarn

build: ## Build the theme assets
	@echo "Executing: yarn build"
	yarn build

dev: ## Build the theme assets and watch them
	@echo "Executing: yarn build"
	yarn watch

update:
	@echo "Running yarn update"
	yarn upgrade

help:
	@printf "\033[33mUsage:\033[0m\n  make [target] \n\n\033[33mTargets:\033[0m\n"
	@grep -E '(^[a-zA-Z_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}{printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'
