Skip to content
Myr

🔨 Update docs.py script to enable dirty reload conditionally (#918)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sebastián Ramírez · committed by GitHub · parent 23ed7b5 · Browse files · 1 file+5 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−6 removed

  • other:+5 added−6 removed

1 file+5 added−6 removed

modified:scripts/docs.py+5 added-6 removed
76 unmodified lines
77 typer.echo("Valid README ✅")787980@app.command()81def live() -> None:81def live(dirty: bool = False) -> None:82 """83 Serve with livereload a docs site for a specific language.8485 This only shows the actual translated files, not the placeholders created with
2 unmodified lines
88 Takes an optional LANG argument with the name of the language to serve, by default89 en.90 """91 # Enable line numbers during local development to make it easier to highlight92 subprocess.run(93 ["mkdocs", "serve", "--dev-addr", "127.0.0.1:8008", "--dirty"],94 env={**os.environ, "LINENUMS": "true"},95 check=True,96 )92 args = ["mkdocs", "serve", "--dev-addr", "127.0.0.1:8008"]93 if dirty:94 args.append("--dirty")95 subprocess.run(args, env={**os.environ, "LINENUMS": "true"}, check=True)969798@app.command()99def build() -> None:
36 unmodified lines