Skip to content

Local development

From the repository root, install the dependencies and run the tests. The layout tests use spytial-core, the engine that enforces the rules while you drag nodes.

npm install
npm test
npm run serve

Open the local playground.

Edit a playground example

Each .gdl file in playground/examples/ contains a graph and its layout rules. Add a file there and reload the playground to see it in the examples menu. To reload an edited example, switch to another example and back. Set a custom title or description in playground/examples.js.

Build the documentation

Edit the Markdown in docs/pages/ and the navigation in mkdocs.yml. To build the site with Material for MkDocs, run these commands from the repository root.

python3 -m venv .venv-docs
source .venv-docs/bin/activate
python -m pip install -r requirements-docs.txt
npm run docs:build

With npm run serve running, open the local documentation. Rerun npm run docs:build after edits. The build also generates the playground’s example list for GitHub Pages. Pushes to main publish the site.

npm package · Changelog · MIT license