Workflows¶
This page describes the tasks you will run most often when contributing to SciFlow.
Development workflow¶
- Edit code inside
packages/*. - Run targeted tests:
- Bundle and inspect the demo:
- Lint, type-check, and test before pushing:
Nx caching
Nx reuses previous results when the inputs have not changed. If it returns stale results, delete .nx/cache and rerun the command.
Feature flags and bundles¶
- Feature packages live under
packages/editor/core/src/lib/features. - Enable or disable them with the sidebar toggles in the demo (
packages/editor/start/demo/js/demo.js). - When developing a feature, bundle the start package so Lit node views pick up your changes.
Test sync strategies¶
Use the core package’s Editor.create API with a mock sync strategy:
const sync: SyncStrategy = {
async load() { return { doc: defaultDoc, version: 0, selection: { anchor: 0, head: 0 } }; },
applyExternal() {},
applyLocal(ops) { console.debug('local ops', ops); },
};
Use this strategy in integration tests or stories to verify the persistence hooks before connecting to a live backend.
Release and publish¶
- Ensure
npx nx run-many -t lint test build typecheckpasses. - Update
packages/*/package.jsonversions if needed. - Build artifacts:
- Publish via the internal release script (see
scripts/publish.sh, not shown here).
Scoped registry
Make sure your npm auth token has publish rights to the GitLab registry before running the release scripts.