Workflows¶
This page outlines the repeatable tasks you’ll run most often when contributing to SciFlow.
Day-to-Day Loop¶
- Edit code inside
packages/*. - Run targeted tests:
- Bundle & inspect the demo:
- Lint + typecheck + test before pushing:
Nx caching
Nx reuses prior results when the inputs haven’t changed. If the cache feels stale, delete .nx/cache and rerun the command.
Feature Flags & Bundles¶
- Feature packages live under
packages/editor/core/src/lib/features. - Enable/disable them in the demo via the sidebar toggle list (
packages/editor/start/demo/js/demo.js). - When developing a feature, bundle the start package so Lit node views pick up your changes.
Sync Strategy Testing¶
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); },
};
Wire this into integration tests or stories to ensure persistence hooks behave before hitting a live backend.
Releasing / Publishing¶
- 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.