2024-03-25 13:28:28 +01:00

29 lines
917 B
Makefile

# Define variables for commands to keep it simple and centralized
NPM := npm
BUILD_DIR := dist
# Default target executed when no arguments are given to make.
default: build
# Target for installing dependencies
install_deps:
@echo "Installing project dependencies..."
@$(NPM) install
# Target for building the project
build: install_deps
@echo "Building the project..."
@$(NPM) run build
@$(MAKE) banner
# Target for printing a completion banner with colors
banner:
@echo -e "\033[1;36m================================================================================\033[0m"
@echo -e "\033[1;32m BUILD COMPLETED SUCCESSFULLY 🎉\033[0m"
@echo -e "\033[1;33m The $(BUILD_DIR) directory is ready to be served as a webroot.\033[0m"
@echo -e "\033[1;36m================================================================================\033[0m"
# Phony targets are not files
.PHONY: install_deps build banner