-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
executable file
·47 lines (35 loc) · 1.2 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
47
all: help
doc: ## Update package documentation with `roxygen2`
cd ..; \
Rscript -e "roxygen2::roxygenise('./dashboard')"; \
cd ./dashboard
check: ## Run `R CMD check` on package
cd ..; \
Rscript -e "rcmdcheck::rcmdcheck('./dashboard')"; \
cd ./dashboard
serve: ## Start local quarto server
cd quarto; \
quarto preview
recache: ## Start local quarto server with '--cache-refresh' to force cache refresh
cd quarto; \
quarto preview --cache-refresh
dev: serve ## alias for 'serve'
render: ## 'quarto render' command
cd quarto; \
quarto render
renv-update: ## Update 'renv' dependencies to latest versions
Rscript -e "renv::update()";
renv-snapshot: ## Update the 'renv.lock' file, generally run after `renv-update`
Rscript -e "renv::snapshot()";
# Lots of variants at:
# https://gist.github.com/prwhite/8168133
# https://stackoverflow.com/questions/35730218/how-to-automatically-generate-a-makefile-help-command
help: ## Show this help
@printf "Usage:\033[36m make [target]\033[0m\n"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
# Phony targets:
.PHONY: render
.PHONY: serve
.PHONY: dev
.PHONY: doc
.PHONY: help