-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (29 loc) · 1.13 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
VERSION := $(shell jq -r '.version' package.json)
.PHONY: install
install: ## Install the npm environment
@echo "🚀 Install the npm environment"
@npm run install
@npm run husky
.PHONY: dev
dev: ## Build production dist
@echo "🚀 Running application locally"
@npm run dev
.PHONY: build
build: clean-build ## Build production dist
@echo "🚀 Building production distributable"
@npm run build
.PHONY: docker-build
docker-build: clean-build ## Build production dist
@echo "🚀 Building Docker Image distributable for tarkov-market-calculator:$(VERSION) 🚀"
@docker build . -t tarkov-calculator-react:$(VERSION)
.PHONY: docker-run
docker-run: docker-build ## Build production dist
@echo "🚀 Building Docker Image distributable for tarkov-market-calculator:$(VERSION) 🚀"
@docker run -it -p 8080:80 --rm --name tarkov-market-calculator-$(VERSION) tarkov-calculator-react:$(VERSION)
.PHONY: clean-build
clean-build: ## clean build artifacts
@rm -rf dist/
.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
.DEFAULT_GOAL := help