forked from openvm-org/openvm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJustfile
58 lines (44 loc) · 1.47 KB
/
Justfile
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
52
53
54
55
56
57
58
set positional-arguments
# default recipe to display help information
default:
@just --list
# Install required dependencies
deps:
cargo install mdbook mdbook-katex mdbook-linkcheck mdbook-mermaid
pnpm i --frozen-lockfile
# Lint the workspace for all available targets
lint: lint-book-md-check lint-book-toc-check lint-filenames lint-book-spelling
# Updates all files to fix linting issues
lint-fix: lint-book-md-fix lint-book-toc
# Validates markdown file formatting
lint-book-md-check:
npx markdownlint-cli2 "./src/**/*.md"
# Updates markdown files formatting to satisfy lints
lint-book-md-fix:
npx markdownlint-cli2 --fix "./src/**/*.md"
# Validates Table of Content Sections with doctoc
lint-book-toc-check:
npx doctoc '--title=**Table of Contents**' ./src && git diff --exit-code ./src
# Updates Table of Content Sections with doctoc
lint-book-toc:
npx doctoc '--title=**Table of Contents**' ./src
# Validates spelling using cspell
lint-book-spelling:
npx cspell "./**/*.md"
# Updates cspell words file with new words
lint-book-spelling-fix:
npx cspell --words-only --unique "./**/*.md" | sort --ignore-case | uniq > words.txt
lint-filenames:
#!/usr/bin/env bash
for file in $(find ./specs -type f); do
if [[ "$file" == *_* ]]; then
echo "File with underscore found: $file"
exit 1
fi
done
echo "Filename linting complete"
build:
mdbook build
# Serves the mdbook locally
serve *args='':
mdbook serve $@