Skip to content

Commit 2f6f882

Browse files
committed
chore(sync): 🔨 synced local 'justfile' with remote '_common/justfile-r'
1 parent eb3785b commit 2f6f882

File tree

1 file changed

+16
-21
lines changed

1 file changed

+16
-21
lines changed

justfile

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,31 @@
11
@_default:
2-
just --list --unsorted
2+
just --list --unsorted
33

44
# Run all recipes
5-
run-all: install-dependencies spell-check style build-site
5+
run-all: install-dependencies check-spelling style build-website
6+
7+
# Installs the pre-commit hooks, if not done already
8+
install-pre-commit:
9+
uvx pre-commit install
610

711
# Install package dependencies
812
install-dependencies:
913
#!/usr/bin/Rscript
1014
pak::pak(ask = FALSE)
1115

12-
# Check spelling of Markdown files
13-
spell-check:
14-
#!/usr/bin/Rscript
15-
files <- fs::dir_ls(here::here(), recurse = TRUE, regexp = "*\\.(md|qmd|Rmd)")
16-
dictionary_file <- here::here("includes/dictionary.txt")
17-
ignore_words <- character()
18-
if (fs::file_exists(dictionary_file))
19-
ignore_words <- readLines(dictionary_file)
20-
spelling::spell_check_files(
21-
files,
22-
ignore_words,
23-
lang = "en_GB"
24-
)
16+
# Check spelling
17+
check-spelling:
18+
uvx typos
2519

2620
# Style all R code
2721
style:
28-
#!/usr/bin/Rscript
29-
styler::style_dir(
30-
here::here(),
31-
exclude_dirs = c(".quarto", "_extensions"),
32-
)
22+
# Need to install air first
23+
air format .
3324

3425
# Build Quarto website
35-
build-site:
26+
build-website:
3627
quarto render
28+
29+
# Installs the pre-commit hooks, if not done already
30+
install-pre-commit:
31+
uvx pre-commit install

0 commit comments

Comments
 (0)