-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (41 loc) · 1.18 KB
/
Makefile
File metadata and controls
51 lines (41 loc) · 1.18 KB
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
48
49
50
51
# Makefile for building socmod documentation and site
.PHONY: all docs site check install clean push preview
# Default target
all: docs
# Build vignettes and pkgdown site
docs:
Rscript -e "pkgdown::build_site()"
# Build just the pkgdown site (skip vignette rendering)
site:
Rscript -e "pkgdown::build_site()"
# Rebuild README.md and associated docs/index.html, opening in new window
readme:
Rscript -e "source('tools/make-figures-readme.R')" \
&& Rscript -e "devtools::build_readme()" \
&& Rscript -e "pkgdown::build_home()" \
&& open docs/index.html
# Run R CMD check
check:
R CMD check socmod
# Install the package locally
install:
R CMD INSTALL socmod
# Clean generated files
clean:
rm -rf vignettes/*.html docs/
# Commit and push the updated site to GitHub
push:
git add docs/
git commit -m "Update site"
git push
# Build and open site preview in default browser
preview:
Rscript -e "quarto::quarto_render('vignettes/florentine-seed-analysis.qmd')"
Rscript -e "pkgdown::build_site()"
@if [ "$(shell uname)" = "Darwin" ]; then \
open docs/index.html; \
elif [ "$(shell uname)" = "Linux" ]; then \
xdg-open docs/index.html; \
else \
start docs/index.html; \
fi