Environment setup¶
This guide is for contributors working inside the SciFlow monorepo.
Prerequisites¶
- Node.js 22 (use
nvm install 22 && nvm use 22or equivalent). - npm – the workspace relies on npm workspaces; PNPM/Yarn are not supported.
- Python 3.11 + pip – only needed if you want to build the MkDocs site locally (
python3 -m venv .venv && pip install -r docs/requirements.txt).
One-time install
Installs dependencies across all packages because Nx + npm workspaces hoist what they can.Repository structure¶
packages/editor/core— ProseMirror runtime, features, and command system.packages/editor/start— web component wrapper, demo assets, and Lit-based helpers.packages/schema— shared schema definitions.docs— MkDocs configuration and Markdown sources.
Core Nx commands¶
| Command | Purpose |
|---|---|
npx nx run-many -t lint test build typecheck |
Local equivalent of the CI gate. |
npx nx test @sciflow/editor-start |
Run Vitest unit tests for the web component. |
npx nx bundle @sciflow/editor-start |
Produce the distributable ES module bundle + demo assets. |
npx nx serve docs |
Start the MkDocs dev server (requires Python deps). |
Demo workflow¶
npx nx bundle @sciflow/editor-start
npx http-server .
# open http://localhost:8080/packages/editor/start/demo/index.html
Rebuild the bundle whenever you touch source files that feed the demo.
Get help¶
- Run
npx nx show project <name>to inspect targets and dependencies. - If Nx returns stale cache artifacts, clear
.nxand rerun the command. Ask in the team channel if the problem continues. - See Documentation tools for MkDocs-specific guidance.