forked from ethereum-optimism/specs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Justfile
45 lines (34 loc) · 1.33 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
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-specs-md-check lint-specs-toc-check lint-links
# Updates all files to fix linting issues
lint-fix: lint-specs-md-fix lint-specs-toc
# Validates markdown file formatting
lint-specs-md-check:
npx markdownlint-cli2 "./specs/**/*.md"
# Updates markdown files formatting to satisfy lints
lint-specs-md-fix:
npx markdownlint-cli2 --fix "./specs/**/*.md"
# Validates Table of Content Sections with doctoc
lint-specs-toc-check:
npx doctoc '--title=**Table of Contents**' ./specs && git diff --exit-code ./specs
# Updates Table of Content Sections with doctoc
lint-specs-toc:
npx doctoc '--title=**Table of Contents**' ./specs
# Validates all hyperlinks respond with status 200
lint-links:
docker run --init -it -v `pwd`:/input lycheeverse/lychee --verbose --no-progress --exclude-loopback \
--exclude twitter.com --exclude explorer.optimism.io --exclude linux-mips.org --exclude vitalik.eth.limo \
--exclude-mail /input/README.md "/input/specs/**/*.md"
build:
mdbook build
# Serves the mdbook locally
serve *args='':
mdbook serve $@