Skip to content

Commit

Permalink
Improve logging in Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
romeovs committed Nov 6, 2024
1 parent c5d7d19 commit 3b7f4e6
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
bin = ./node_modules/.bin

ifneq (CI,1)
SILENT += >/dev/null
endif

# Logging

__blue = $$(tput setaf 4)
__normal = $$(tput sgr0)
title = $(shell pwd | xargs basename)
log = printf "$(__blue)$(title): $(__normal) %s\\n"

help: ## Show this help.
@echo 'NTS Desktop'
@echo 'Please use one of these make rules:'
Expand Down Expand Up @@ -30,6 +41,7 @@ TSC_FLAGS =

typecheck: ## Check for type errors
typecheck:
@$(log) "Typechecking..."
@$(bin)/tsc --noEmit $(TSC_FLAGS)

typecheck.watch: ## Check for type errors and recheck when a file changes
Expand All @@ -43,12 +55,14 @@ format:

formatting: ## Check the formatting of all code
formatting:
@$(bin)/biome check . --linter-enabled=false --organize-imports-enabled=true
@$(log) "Checking format..."
@$(bin)/biome check . --linter-enabled=false --organize-imports-enabled=true $(SILENT)


lint: ## Check lint
lint:
@$(bin)/biome lint .
@$(log) "Linting..."
@$(bin)/biome lint . $(SILENT)

index: # Build the "server"-side js
index: app/main.ts
Expand Down

0 comments on commit 3b7f4e6

Please sign in to comment.