Skip to content

Latest commit

 

History

History
64 lines (43 loc) · 2.26 KB

README.md

File metadata and controls

64 lines (43 loc) · 2.26 KB

docs-as-code

Docs-as-code tooling for Eclipse S-CORE

Full documentation is on GitHub Pages.

Note

This repository offers a DevContainer. For setting this up read eclipse-score/devcontainer/README.md#inside-the-container.

Development of docs-as-code

Getting IDE support for docs-as-code development

Create the virtual environment via bazel run //:ide_support. If your IDE does not automatically ask you to activate the newly created environment you can activate it.

  • In VSCode via ctrl+p => Select Python Interpreter then select .venv_docs/bin/python
  • In the terminal via . .venv_docs/bin/activate

Configuring the docs build directory

bazel run //:docs (and the other interactive docs targets) write their output to _build by default. Set DOCS_BUILD_DIR to use a different directory. Relative paths are resolved against the package containing the docs() call; absolute paths are used as-is.

Warning

The directory is deleted when the build cache is stale, so point it at a dedicated directory. Paths that equal or contain the workspace, package or source directory are rejected.

export DOCS_BUILD_DIR=docs_build_tmp
bazel run //:docs

Enabeling pre-commit

Pre-commit is supported inside docs-as-code to help with code quality and make developers workflow easier.

Install the hook:

pre-commit install

# Or install it to run on pre-push via:
pre-commit install --hook-type pre-push

Execute the pre-commit manually via pre-commit run or pre-commit run --all-files to run it on all files.